PageSourceSearch

https://www.iapts.com/wp-content/themes/Divi-child/scripts/scripts.js?ver=1.0.1790864231490

js iapts.com collected 2026-10-01 14:17:57 UTC 5,091 bytes, 176 lines download raw bytes

1(function($){
2
3
4// this would turn the 1st iframe in document blue.
5$(window).load(function() {
6 
7	$(".wpp-cardview li .wpp-post-title").css("font-size", "1em");
8});
9	$(window).on("scroll", function() {
10		if ($(window).scrollTop() >= 1) {
11			$("#main-header").addClass("header-scrolled");
12		
13			$("#logo").attr("src", "/wp-content/uploads/2020/09/iAptments_Logo_FINAL.svg");
14			$(".manager-icon").attr("src", "/wp-content/uploads/2020/09/login-icon-gray.svg");
15			$(".support-icon").attr("src", "/wp-content/uploads/2020/09/support-icon-gray.svg");
16			$(".contact-icon").attr("src", "/wp-content/uploads/2020/09/phone-outgoing-gray.svg");
17		} else {
18			$("#main-header").removeClass("header-scrolled");
19			$("#logo").attr("src", "/wp-content/uploads/2020/09/iapartments-logo.svg");
20			$(".manager-icon").attr("src", "/wp-content/uploads/2020/09/login-icon.svg");
21			$(".support-icon").attr("src", "/wp-content/uploads/2020/09/support-icon-1.svg");
22			$(".contact-icon").attr("src", "/wp-content/uploads/2020/09/phone-outgoing.svg");
23		}
24		
25	});
26	
27
28	$(".menu-icon").on("click", function() {
29		$(".menu-icon").toggleClass("active-toggle");
30		$(".menu-main-menu-container").toggleClass("mobile-menu-visible");
31	});
32	
33	// Bypass Safari hover state on mobile to avoid double tapping
34	$("#et_mobile_nav_menu li.menu-item-has-children a").on("click touchstart", function(e) {
35	
36		if(e.type == 'touchstart') {
37			// Trigger dropdown on mobile from a nav link, double tap main level menu item to go to url
38			e.stopImmediatePropagation();
39    	}
40		
41		$(this).next().toggleClass("sub-toggle");
42		$(this).parent().toggleClass("sub-list-toggle-after");
43	});
44	
45	$('.img-info-slider').slick({
46		dots: true,
47		infinite: true,
48		slidesToShow: 1,
49		autoplaySpeed: 4000,
50		centerMode: false,
51		swipeToSlide: true,
52		autoplay: true,
53		arrows: true,
54		fade: false,
55  		cssEase: 'linear',
56		responsive: [
57			{
58				breakpoint: 767,
59				settings: {
60					slidesToShow: 1
61				}
62			}
63		]
64	});
65	
66	$('.mobile-slick-slider-offset').slick({
67		dots: false,
68		infinite: true,
69		slidesToShow: 1,
70		autoplaySpeed: 4000,
71		centerMode: false,
72		swipeToSlide: true,
73		autoplay: true,
74		arrows: true,
75		fade: false,
76  		cssEase: 'linear'
77	});
78	
79	
80	
81	$(window).on('load resize orientationchange', function() {
82        $('.mobile-slick-slider').each(function(){
83            var $carousel = $(this);
84            /* Initializes a slick carousel only on mobile screens */
85            // slick on mobile
86            if ($(window).width() > 980) {
87                if ($carousel.hasClass('slick-initialized')) {
88                    $carousel.slick('unslick');
89                }
90            }
91            else{
92                if (!$carousel.hasClass('slick-initialized')) {
93                    $carousel.slick({
94                        dots: false,
95						infinite: true,
96						slidesToShow: 1,
97						autoplaySpeed: 5400,
98						centerMode: false,
99						swipeToSlide: true,
100						autoplay: true,
101						arrows: true,
102						fade: false,
103						cssEase: 'linear',
104                        mobileFirst: true,
105                    });
106                }
107            }
108        });
109		
110		let winWidth = $(window).outerWidth();
111		$("#menu-main-menu > li").each(function() {
112		if (winWidth >= 980) {
113			$(this).hover(function() {
114				$(this).find("ul").addClass('submenu_indicator');
115				if ($(this).find("ul").hasClass('submenu_indicator')) {
116					$(this).find("a").addClass("menu-item-active");
117				}
118			}, function() {
119				$(this).find("ul").removeClass('submenu_indicator');
120				if (!$(this).find("ul").hasClass('submenu_indicator')) {
121					$(this).find("a").removeClass("menu-item-active");
122				}
123			});
124		}
125	});
126		
127	if (winWidth < 980) {
128		// Who We Serve and What We Do triggers on mobile
129		$("#menu-item-462 > a").attr("href", "#");
130		$("#menu-item-1030 > a").attr("href", "#");
131	}
132		
133    });
134	
135	let src_url = {
136		smartLock: "/wp-content/uploads/2020/09/iapartments-app-locks.png",
137		smartPlug: "/wp-content/uploads/2020/09/iapartments-app-smart-plug.png",
138		smartThermostat: "/wp-content/uploads/2020/09/iapartments-app-thermostat.png",
139		leak: "/wp-content/uploads/2020/09/iapartments-app-leak-sensor.png",
140		devices: "/wp-content/uploads/2020/09/iapartments-app-main.png"
141	};
142
143	let phone = $("#phone");
144	let classes = ["smart-lock", "smart-plug", "smart-thermostat", "leak-sensors", "devices"];
145	
146	function muteModules() {
147		$.each(classes, function(index, val) {
148			$("." + val).addClass("module-muted");
149			$("." + val).removeClass("module-active");
150		});
151	}
152	
153	$(".smart-lock, .smart-plug, .smart-thermostat, .leak-sensors, .devices").hover(function(){
154		muteModules();
155		$(this).addClass("module-active");
156	});
157	
158	$(".smart-lock").hover(function(){
159		phone.attr("src", src_url.smartLock);
160	});	
161	$(".smart-plug").hover(function(){
162		phone.attr("src", src_url.smartPlug);
163	});
164	$(".smart-thermostat").hover(function(){
165		phone.attr("src", src_url.smartThermostat);
166	});
167	$(".leak-sensors").hover(function(){
168		phone.attr("src", src_url.leak);
169	});
170	$(".devices").hover(function(){
171		phone.attr("src", src_url.devices);
172	});
173
174
175
176})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.