PageSourceSearch

https://aalta-lab.com/assets/js/main.js

js aalta-lab.com collected 2026-10-08 20:04:24 UTC 8,794 bytes, 372 lines download raw bytes

1(function($){
2	"use strict";
3
4	// Header Sticky
5	$(window).on('scroll',function() {
6		if ($(this).scrollTop() > 120){
7			$('.navbar-area').addClass("is-sticky");
8		}
9		else{
10			$('.navbar-area').removeClass("is-sticky");
11		}
12	});
13
14	// Others Option Responsive JS
15	$(".others-option-for-responsive .dot-menu").on("click", function(){
16		$(".others-option-for-responsive .container .container").toggleClass("active");
17	});
18
19	// Button Hover JS
20    $(function() {
21		$('.default-btn')
22		.on('mouseenter', function(e) {
23			var parentOffset = $(this).offset(),
24			relX = e.pageX - parentOffset.left,
25			relY = e.pageY - parentOffset.top;
26			$(this).find('span').css({top:relY, left:relX})
27		})
28		.on('mouseout', function(e) {
29			var parentOffset = $(this).offset(),
30			relX = e.pageX - parentOffset.left,
31			relY = e.pageY - parentOffset.top;
32			$(this).find('span').css({top:relY, left:relX})
33		});
34	});
35
36	// Popup Video
37	$('.popup-youtube').magnificPopup({
38		disableOn: 320,
39		type: 'iframe',
40		mainClass: 'mfp-fade',
41		removalDelay: 160,
42		preloader: false,
43		fixedContentPos: false
44	});
45
46	// Mean Menu
47	$('.mean-menu').meanmenu({
48		meanScreenWidth: "1199"
49	});
50
51	// Home Slides
52	$('.home-slides').owlCarousel({
53		loop: true,
54		nav: true,
55		dots: false,
56		autoplayHoverPause: true,
57		autoplay: true,
58		items: 1,
59		navText: [
60			"<i class='flaticon-left-1'></i>",
61			"<i class='flaticon-right-1'></i>"
62		]
63	});
64
65
66	// Case Study Slides
67	$('.case-study-slides').owlCarousel({
68		loop: true,
69		nav: true,
70		dots: false,
71		autoplayHoverPause: true,
72		autoplay: true,
73		items: 1,
74		navText: [
75			"<i class='flaticon-left-1'></i>",
76			"<i class='flaticon-right-1'></i>"
77		]
78	});
79
80	$('.logos').owlCarousel({
81		loop: true,
82		nav: false,
83		dots: false,
84		margin: 30,
85		autoplayHoverPause: false,
86		autoplay: true,
87		autoplayTimeout:2000,
88		margin: 6,
89		navText: [
90			"<i class='flaticon-left-1'></i>",
91			"<i class='flaticon-right-1'></i>"
92		],
93		responsive: {
94			0: {
95				items: 3,
96			},
97			768: {
98				items: 6,
99			}
100
101		}
102	});
103
104	$('.slider').owlCarousel({
105		loop: true,
106		nav: false,
107		dots: false,
108		autoplayHoverPause: false,
109		autoplay: true,
110		autoplayTimeout:3000,
111		items: 1,
112		margin: 10,
113		navText: [
114			"<i class='flaticon-left-1'></i>",
115			"<i class='flaticon-right-1'></i>"
116		],
117	});
118
119	// Testimonials Slides
120	$('.testimonials-slides').owlCarousel({
121		loop: true,
122		nav: true,
123		dots: false,
124		autoplayHoverPause: true,
125		autoplay: true,
126		margin: 30,
127		navText: [
128			"<i class='flaticon-left-1'></i>",
129			"<i class='flaticon-right-1'></i>"
130		],
131		responsive: {
132			0: {
133				items: 1,
134			},
135			768: {
136				items: 2,
137			},
138			992: {
139				items: 2,
140			}
141		}
142	});
143
144	// Isotop Js
145	var $grid = $('.projects-items, .blog-items').isotope({
146		itemSelector: '.grid-item',
147		percentPosition: true,
148		masonry: {
149			// Use outer width of grid-sizer for columnWidth
150			columnWidth: '.grid-item'
151		}
152	});
153
154	// Services Image Slides
155	$('.services-details-image-slides').owlCarousel({
156		loop: true,
157		nav: true,
158		items: 1,
159		dots: false,
160		autoplayHoverPause: true,
161		autoplay: true,
162		animateOut: 'fadeOut',
163        animateIn: 'fadeIn',
164		navText: [
165			"<i class='flaticon-left-1'></i>",
166			"<i class='flaticon-right-1'></i>"
167		]
168	});
169
170	// Case Studies Image Slides
171	$('.case-studies-details-image-slides').owlCarousel({
172		loop: true,
173		nav: true,
174		items: 1,
175		dots: false,
176		autoplayHoverPause: true,
177		autoplay: true,
178		animateOut: 'fadeOut',
179        animateIn: 'fadeIn',
180		navText: [
181			"<i class='flaticon-left-1'></i>",
182			"<i class='flaticon-right-1'></i>"
183		]
184	});
185
186	// Article Image Slides
187	$('.article-image-slides').owlCarousel({
188		loop: true,
189		nav: true,
190		items: 1,
191		dots: false,
192		autoplayHoverPause: true,
193		autoplay: true,
194		animateOut: 'fadeOut',
195        animateIn: 'fadeIn',
196		navText: [
197			"<i class='flaticon-left-1'></i>",
198			"<i class='flaticon-right-1'></i>"
199		]
200	});
201
202	// WOW Animation JS
203	if($('.wow').length){
204		var wow = new WOW({
205			mobile:       false
206		});
207		wow.init();
208	}
209
210	// Nice Select JS
211	$('select').niceSelect();
212
213	// Price Range Slider JS
214	$(".js-range-of-price").ionRangeSlider({
215		type: "double",
216		drag_interval: true,
217		min_interval: null,
218		max_interval: null,
219	});
220
221	// Input Plus & Minus Number JS
222	$('.input-counter').each(function() {
223		var spinner = jQuery(this),
224		input = spinner.find('input[type="text"]'),
225		btnUp = spinner.find('.plus-btn'),
226		btnDown = spinner.find('.minus-btn'),
227		min = input.attr('min'),
228		max = input.attr('max');
229
230		btnUp.on('click', function() {
231			var oldValue = parseFloat(input.val());
232			if (oldValue >= max) {
233				var newVal = oldValue;
234			} else {
235				var newVal = oldValue + 1;
236			}
237			spinner.find("input").val(newVal);
238			spinner.find("input").trigger("change");
239		});
240		btnDown.on('click', function() {
241			var oldValue = parseFloat(input.val());
242			if (oldValue <= min) {
243				var newVal = oldValue;
244			} else {
245				var newVal = oldValue - 1;
246			}
247			spinner.find("input").val(newVal);
248			spinner.find("input").trigger("change");
249		});
250	});
251
252	// Count Time
253	function makeTimer() {
254		var endTime = new Date("December 31, 2022 17:00:00 PDT");
255		var endTime = (Date.parse(endTime)) / 1000;
256		var now = new Date();
257		var now = (Date.parse(now) / 1000);
258		var timeLeft = endTime - now;
259		var days = Math.floor(timeLeft / 86400);
260		var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
261		var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
262		var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
263		if (hours < "10") { hours = "0" + hours; }
264		if (minutes < "10") { minutes = "0" + minutes; }
265		if (seconds < "10") { seconds = "0" + seconds; }
266		$("#days").html(days + "<span>Days</span>");
267		$("#hours").html(hours + "<span>Hours</span>");
268		$("#minutes").html(minutes + "<span>Minutes</span>");
269		$("#seconds").html(seconds + "<span>Seconds</span>");
270	}
271	setInterval(function() { makeTimer(); }, 0);
272
273	// Sidebar Sticky
274	$('.case-studies-sidebar-sticky').stickySidebar({
275		topSpacing: 85,
276		bottomSpacing: 85
277	});
278
279	// Subscribe form
280	$(".newsletter-form").validator().on("submit", function (event) {
281		if (event.isDefaultPrevented()) {
282			// handle the invalid form...
283			formErrorSub();
284			submitMSGSub(false, "Please enter your email correctly.");
285		} else {
286			// everything looks good!
287			event.preventDefault();
288		}
289	});
290	function callbackFunction (resp) {
291		if (resp.result === "success") {
292			formSuccessSub();
293		}
294		else {
295			formErrorSub();
296		}
297	}
298	function formSuccessSub(){
299		$(".newsletter-form")[0].reset();
300		submitMSGSub(true, "Thank you for subscribing!");
301		setTimeout(function() {
302			$("#validator-newsletter").addClass('hide');
303		}, 4000)
304	}
305	function formErrorSub(){
306		$(".newsletter-form").addClass("animated shake");
307		setTimeout(function() {
308			$(".newsletter-form").removeClass("animated shake");
309		}, 1000)
310	}
311	function submitMSGSub(valid, msg){
312		if(valid){
313			var msgClasses = "validation-success";
314		} else {
315			var msgClasses = "validation-danger";
316		}
317		$("#validator-newsletter").removeClass().addClass(msgClasses).text(msg);
318	}
319	// AJAX MailChimp
320	$(".newsletter-form").ajaxChimp({
321		url: "https://envytheme.us20.list-manage.com/subscribe/post?u=60e1ffe2e8a68ce1204cd39a5&amp;id=42d6d188d9", // Your url MailChimp
322		callback: callbackFunction
323	});
324
325	// Tabs
326	(function ($) {
327		$('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current');
328		$('.tab ul.tabs li a').on('click', function (g) {
329			var tab = $(this).closest('.tab'),
330			index = $(this).closest('li').index();
331			tab.find('ul.tabs > li').removeClass('current');
332			$(this).closest('li').addClass('current');
333			tab.find('.tab-content').find('div.tabs-item').not('div.tabs-item:eq(' + index + ')').slide
333Up();
334			tab.find('.tab-content').find('div.tabs-item:eq(' + index + ')').slideDown();
335			g.preventDefault();
336		});
337	})(jQuery);
338
339	// FAQ Accordion
340	$(function() {
341		$('.accordion').find('.accordion-title').on('click', function(){
342			// Adds Active Class
343			$(this).toggleClass('active');
344			// Expand or Collapse This Panel
345			$(this).next().slideToggle('fast');
346			// Hide The Other Panels
347			$('.accordion-content').not($(this).next()).slideUp('fast');
348			// Removes Active Class From Other Titles
349			$('.accordion-title').not($(this)).removeClass('active');
350		});
351	});
352
353	// Go to Top
354	$(function(){
355		// Scroll Event
356		$(window).on('scroll', function(){
357			var scrolled = $(window).scrollTop();
358			if (scrolled > 600) $('.go-top').addClass('active');
359			if (scrolled < 600) $('.go-top').removeClass('active');
360		});
361		// Click Event
362		$('.go-top').on('click', function() {
363			$("html, body").animate({ scrollTop: "0" },  500);
364		});
365	});
366
367	// Preloader
368    $(window).on('load', function () {
369        $('.preloader').fadeOut();
370    });
371
372}(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.