PageSourceSearch

https://navisapps.com/assets/js/main.js

js navisapps.com collected 2026-10-02 01:37:08 UTC 12,348 bytes, 405 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    // Header Sticky
15    $(window).on('scroll',function() {
16        if ($(this).scrollTop() > 120){  
17            $('.navbar-area').addClass("is-sticky");
18        }
19        else{
20            $('.navbar-area').removeClass("is-sticky");
21        }
22    });
23
24    // Sidebar Modal
25    $(".burger-menu").on('click',  function() {
26        $('.sidebar-modal').toggleClass('active');
27    });
28    $(".sidebar-modal-close-btn").on('click',  function() {
29        $('.sidebar-modal').removeClass('active');
30    });
31    
32    // Search Popup JS
33    $('.close-btn').on('click',function() {
34        $('.search-overlay').fadeOut();
35        $('.search-btn').show();
36        $('.close-btn').removeClass('active');
37    });
38    $('.search-btn').on('click',function() {
39        $(this).hide();
40        $('.search-overlay').fadeIn();
41        $('.close-btn').addClass('active');
42    });
43    
44    // Mean Menu
45    jQuery('.mean-menu').meanmenu({
46        meanScreenWidth: "991"
47    });
48
49    // Popup Video
50    $('.popup-youtube').magnificPopup({
51        disableOn: 320,
52        type: 'iframe',
53        mainClass: 'mfp-fade',
54        removalDelay: 160,
55        preloader: false,
56        fixedContentPos: false
57    });
58
59    // Odometer JS
60    $('.odometer').appear(function(e) {
61        var odo = $(".odometer");
62        odo.each(function() {
63            var countNumber = $(this).attr("data-count");
64            $(this).html(countNumber);
65        });
66    });
67
68    // Tabs
69    (function ($) {
70        $('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current');
71        $('.tab ul.tabs li a').on('click', function (g) {
72            var tab = $(this).closest('.tab'), 
73            index = $(this).closest('li').index();
74            tab.find('ul.tabs > li').removeClass('current');
75            $(this).closest('li').addClass('current');
76            tab.find('.tab_content').find('div.tabs_item').not('div.tabs_item:eq(' + index + ')').slideUp();
77            tab.find('.tab_content').find('div.tabs_item:eq(' + index + ')').slideDown();
78            g.preventDefault();
79        });
80    })(jQuery);
81    
82    // MixItUp JS
83    $('#Container').mixItUp();
84
85    // Testimonial-slides
86    $('.testimonial-slides').owlCarousel({
87        loop: true,
88        nav: true,
89        dots: true,
90        smartSpeed: 2000,
91        margin: 30,
92        active: true,
93        autoplayHoverPause: true,
94        autoplay: true,
95        navText: [
96            "<i class='flaticon-left-arrow-1'></i>",
97            "<i class='flaticon-right-arrow-1'></i>"
98        ],
99        responsive: {
100            0: {
101                items: 1
102            },
103            576: {
104                items: 1
105            },
106            768: {
107                items: 2
108            },
109            1200: {
110                items: 2
111            }
112        }
113    });
114
115    // Partner-slider
116    $('.partner-slider').owlCarousel({
117        loop: true,
118        nav: false,
119        dots: false,
120        smartSpeed: 2000,
121        margin: 30,
122        autoplayHoverPause: true,
123        autoplay: false,
124
125        responsive: {
126            0: {
127                items: 2
128            },
129            576: {
130                items: 3
131            },
132            768: {
133                items: 4
134            },
135            1200: {
136                items: 5
137            }
138        }
139    });
140
141    // Go to Top
142    $(function(){
143        // Scroll Event
144        $(window).on('scroll', function(){
145            var scrolled = $(window).scrollTop();
146            if (scrolled > 600) $('.go-top').addClass('active');
147            if (scrolled < 600) $('.go-top').removeClass('active');
148        });  
149        // Click Event
150        $('.go-top').on('click', function() {
151            $("html, body").animate({ scrollTop: "0" },  500);
152        });
153    });
154    
155    // Pricing Tabs
156    (function ($) {
157        $('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current');
158        $('.tab ul.tabs li a').on('click', function (g) {
159            var tab = $(this).closest('.tab'), 
160            index = $(this).closest('li').index();
161            tab.find('ul.tabs > li').removeClass('current');
162            $(this).closest('li').addClass('current');
163            tab.find('.tab-content').find('div.tabs-item').not('div.tabs-item:eq(' + index + ')').slideUp();
164            tab.find('.tab-content').find('div.tabs-item:eq(' + index + ')').slideDown();
165            g.preventDefault();
166        });
167    })(jQuery);
168
169    // Client-slides
170    $('.client-slides').owlCarousel({
171        loop: true,
172        nav: true,
173        dots: true,
174        smartSpeed: 2000,
175        margin: 30,
176        autoplayHoverPause: true,
177        autoplay: true,
178        navText: [
179            "<i class='flaticon-left-arrow-1'></i>",
180            "<i class='flaticon-right-arrow-1'></i>"
181        ],
182        responsive: {
183            0: {
184                items: 1
185            },
186            576: {
187                items: 1
188            },
189            768: {
190                items: 2
191            },
192            1200: {
193                items: 1
194            }
195        }
196    });
197
198    // FAQ Accordion
199    $(function() {
200        $('.accordion').find('.accordion-title').on('click', function() {
201            // Adds Active Class
202            $(this).toggleClass('active');
203            // Expand or Collapse This Panel
204            $(this).next().slideToggle('fast');
205            // Hide The Other Panels
206            $('.accordion-content').not($(this).next()).slideUp('fast');
207            // Removes Active Class From Other Titles
208            $('.accordion-title').not($(this)).removeClass('active');
209        });
210    });
211
212    // Nice Select JS
213    $('select').niceSelect();
214    
215    // Input Plus & Minus Number JS
216    $('.input-counter').each(function() {
217        var spinner = jQuery(this),
218        input = spinner.find('input[type="text"]'),
219        btnUp = spinner.find('.plus-btn'),
220        btnDown = spinner.find('.minus-btn'),
221        min = input.attr('min'),
222        max = input.attr('max');
223        
224        btnUp.on('click', function() {
225            var oldValue = parseFloat(input.val());
226            if (oldValue >= max) {
227                var newVal = oldValue;
228            } else {
229                var newVal = oldValue + 1;
230            }
231            spinner.find("input").val(newVal);
232            spinner.find("input").trigger("change");
233        });
234        btnDown.on('click', function() {
235            var oldValue = parseFloat(input.val());
236            if (oldValue <= min) {
237                var newVal = oldValue;
238            } else {
239                var newVal = oldValue - 1;
240            }
241            spinner.find("input").val(newVal);
242            spinner.find("input").trigger("change");
243        });
244    });
245    
246    // Count Time 
247    function makeTimer() {
248        var endTime = new Date("September 30, 2025 17:00:00 PDT");			
249        var endTime = (Date.parse(endTime)) / 1000;
250        var now = new Date();
251        var now = (Date.parse(now) / 1000);
252        var timeLeft = endTime - now;
253        var days = Math.floor(timeLeft / 86400); 
254        var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
255        var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
256        var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
257        if (hours < "10") { hours = "0" + hours; }
258        if (minutes < "10") { minutes = "0" + minutes; }
259        if (seconds < "10") { seconds = "0" + seconds; }
260        $("#days").html(days + "<span>Days</span>");
261        $("#hours").html(hours + "<span>Hours</span>");
262        $("#minutes").html(minutes + "<span>Minutes</span>");
263        $("#seconds").html(seconds + "<span>Seconds</span>");
264    }
265    setInterval(function() { makeTimer(); }, 1000);
266
267    // WOW JS
268    $(window).on ('load', function (){
269        if ($(".wow").length) { 
270            var wow = new WOW({
271            boxClass:     'wow',      // animated element css class (default is wow)
272            animateClass: 'animated', // animation css class (default is animated)
273            offset:       20,          // distance to the element when triggering the animation (default is 0)
274            mobile:       true,       // trigger animations on mobile devices (default is true)
275            live:         true,       // act on asynchronously loaded content (default is true)
276          });
277          wow.init();
278        }
279    });
280	
281	// Subscribe form
282	$(".newsletter-form").validator().on("submit", function (event) {
283		if (event.isDefaultPrevented()) {
284		// handle the invalid form...
285			formErrorSub();
286			submitMSGSub(false, "Please enter your email correctly.");
287		} else {
288			// everything looks good!
289			event.preventDefault();
290		}
291	});
292	function callbackFunction (resp) {
293		if (resp.result === "success") {
294			formSuccessSub();
295		}
296		else {
297			formErrorSub();
298		}
299	}
300	function formSuccessSub(){
301		$(".newsletter-form")[0].reset();
302		submitMSGSub(true, "Thank you for subscribing!");
303		setTimeout(function() {
304			$("#validator-newsletter").addClass('hide');
305		}, 4000)
306	}
307	function formErrorSub(){
308		$(".newsletter-form").addClass("animated shake");
309		setTimeout(function() {
310			$(".newsletter-form").removeClass("animated shake");
311		}, 1000)
312	}
313	function submitMSGSub(valid, msg){
314		if(valid){
315			var msgClasses = "validation-success";
316		} else {
317			var msgClasses = "validation-danger";
318		}
319		$("#validator-newsletter").removeClass().addClass(msgClasses).text(msg);
320	}
321	
322	// AJAX MailChimp
323	$(".newsletter-form").ajaxChimp({
324		url: "https://envytheme.us20.list-manage.com/subscribe/post?u=60e1ffe2e8a68ce1204cd39a5&amp;id=42d6d188d9", // Your url MailChimp
325		callback: callbackFunction
326	});
327    
328    // Preloader
329	jQuery(window).on('load', function() {
330		$('.preloader').fadeOut();
331    });
332    
333    // Home Slides
334    $('.home-slides').owlCarousel({
335        loop: true,
336        nav: true,
337        dots: false,
338        autoplayHoverPause: true,
339        items: 1,
340        smartSpeed: 750,
341        autoplay: true,
342        navText: [
343            "<i class='fa fa-chevron-left'></i>",
344            "<i class='fa fa-chevron-right'></i>"
345        ],
346    });
347
348    // Projects-slider
349    $('.projects-slider').owlCarousel({
350        loop: true,
351        nav: false,
352        dots: false,
353        smartSpeed: 2000,
354        margin: 30,
355        autoplayHoverPause: true,
356        autoplay: true,
357        responsive: {
358            0: {
359                items: 1
360            },
361            576: {
362                items: 1
363            },
364            768: {
365                items: 2
366            },
367            1024: {
368                items: 3
369            },
370            1200: {
371                items: 4
372            }
373        }
374    });
375
376	// Switch Btn
377	$('body').append("<div class='switch-box'><label id='switch' class='switch'><input type='checkbox' onchange='toggleTheme()' id='slider'><span class='slider round'></span></label></div>");
378    
379}(jQuery));
380
381// function to set a given theme/color-scheme
382function setTheme(themeName) {
383    localStorage.setItem('crimso_theme', themeName);
384    document.documentElement.className = themeName;
385}
386
387// function to toggle between light and dark theme
388function toggleTheme() {
389    if (localStorage.getItem('crimso_theme') === 'theme-dark') {
390        setTheme('theme-light');
391    } else {
392        setTheme('theme-dark');
393    }
394}
395
396// Immediately invoked function to set the theme on initial load
397(function () {
398    if (localStorage.getItem('crimso_theme') === 'theme-dark') {
399        setTheme('theme-dark');
400        document.getElementById('slider').checked = false;
401    } else {
402        setTheme('theme-light');
403      document.getElementById('slider').checked = true;
404    }
405})();

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.