PageSourceSearch

https://www.mobiiot.in/wp-content/plugins/nest-addons/assets/js/main.js?ver=1790307777

js mobiiot.in collected 2026-09-25 03:43:43 UTC 25,279 bytes, 681 lines download raw bytes

1/*==================================================
2                    Nest Theme Js
3==================================================*/
4(function ($) {
5    ("use strict");
6    // Page loading
7    $(window).on("load", function () { 
8        $("#onloadModal").modal("show");
9    });
10    document.onreadystatechange = function () {
11        var state = document.readyState;
12        if (state == 'interactive') {
13            var preloaderActive = document.getElementById('preloader-active');
14            if (preloaderActive) {
15                preloaderActive.style.visibility = "visible"
16            }
17        } else if (state == 'complete') {
18            setTimeout(function () {
19                var preloaderActive = document.getElementById('preloader-active');
20                if (preloaderActive) {
21                    preloaderActive.style.visibility = "hidden"
22                }
23            }, 300)
24        }
25    };
26    /*-----------------
27        ScrollUp
28    -----------------*/    
29    var btn = $('.scrollUp');
30    $(window).scroll(function() {
31        if ($(window).scrollTop() > 300) {
32            btn.addClass('show');
33        } else {
34        btn.removeClass('show');
35        }
36    });
37    btn.on('click', function(e) {
38        e.preventDefault();
39        $('html, body').animate({scrollTop:0}, '300');
40    }); 
41    var mobileheader = $('.mobile_floating_menu');
42    $(window).scroll(function() {
43        if ($(window).scrollTop() > 300) {
44            mobileheader.addClass('show');
45        } else {
46            mobileheader.removeClass('show');
47        }
48    }); 
49    /*-----------------
50        sidebar sticky
51    -----------------*/ 
52    if($(".sticky-sidebar").length) {
53        $(".sticky-sidebar").theiaStickySidebar();
54    }
55    /*-----------------
56    Hero slider 1
57    -----------------*/ 
58    function nest_slider_one() {
59        // banner-carousel
60        if ($('.hero-slider-1').length) {
61            $('.hero-slider-1').owlCarousel({
62                loop:false,
63                margin:10,
64                nav:true,
65                dots:true,
66                autoplayHoverPause:true ,
67                animateOut: 'fadeOut',
68                animateIn: 'fadeIn',
69                thumbs: false,
70                active: true,
71                autoHeight:true,
72                smartSpeed: 1000,
73                autoplay: 6000,
74                navText: [ '<span class="slider-btn slider-prev"><i class="fi-rs-angle-left"></i></span>', '<span class="slider-btn slider-next"><i class="fi-rs-angle-right"></i></span>' ],
75                responsive:{
76                    0:{
77                        items:1
78                    },
79                    600:{
80                        items:1
81                    },
82                    800:{
83                        items:1
84                    },
85                    1024:{
86                        items:1
87                    }
88                }
89        });
90        }}
91
92
93        /*-----------------
94    Hero slider 1
95    -----------------*/ 
96    function nest_product_single_slider() {
97        // banner-carousel
98        if ($('.product-image-slider').length) {
99            $('.product-image-slider').owlCarousel({
100                autoplay: true,
101                autoplayTimeout: 4000,
102                loop: true,
103                items: 1,
104                center: true,
105                nav: false,
106                thumbs: true,
107                thumbImage: false,
108                dots: false,
109                thumbsPrerendered: true,
110                thumbContainerClass: 'owl-thumbs',
111                thumbItemClass: 'owl-thumb-item'
112            });
113        }
114    }
115
116
117    /*-----------------------------
118            Theme Carousel
119    -----------------------------*/
120    function nest_theme_owl_carousel() {
121        if ($('.theme_carousel').length) {
122                $(".theme_carousel").each(function (index) {
123                var $owlAttr = {
124                    thumbs: false,
125                    animateOut: 'slideOut',
126                    animateIn: 'slideIn',
127                    navText: [ '<i class="fi-rs-arrow-small-left"></i>', '<i class="fi-rs-arrow-small-right"></i>' ],
128                },
129                $extraAttr = $(this).data("options");
130                $.extend($owlAttr, $extraAttr);
131                $(this).owlCarousel($owlAttr);
132                
133            });
134        }
135    } 
136  function nest_tabtwo() {
137    if ($('.product-tabs_two').length) {
138        $('.product-tabs_two .nav-tabs .nav-link').on('click', function(e) {
139            e.preventDefault();
140            
141            // Find the closest product-tabs_two container to this specific clicked tab
142            var closestTabContainer = $(this).closest('.product-tabs_two');
143            
144            // Only select theme_carousel within this specific container
145            var header = closestTabContainer.find('.s_tabs_content .tab-pane .theme_carousel');
146        
147            header.addClass('loading');
148            setTimeout(function() {
149                header.removeClass('loading');
150            }, 1000);
151        }); 
152    }
153}
154    /*-----------------------------
155            Timer Countdown
156    -----------------------------*/
157    function nest_deals() {
158    $("[data-countdown]").each(function () {
159        var $this = $(this),
160        finalDate = $(this).data("countdown");
161        $this.countdown(finalDate, function (event) {
162            $(this).html(event.strftime("" + '<span class="countdown-section"><span class="countdown-amount hover-up">%D</span><span class="countdown-period days">  </span></span>' + '<span class="countdown-section"><span class="countdown-amount hover-up">%H</span><span class="countdown-period hours">  </span></span>' + '<span class="countdown-section"><span class="countdown-amount hover-up">%M</span><span class="countdown-period mins">  </span></span>' + '<span class="countdown-section"><span class="countdown-amount hover-up">%S</span><span class="countdown-period sec">  </span></span>'));
163        });
164    });
165    }
166    /*-----------------------------
167            Category toggle function
168    -----------------------------*/ 
169    var searchToggle = $(".categories-button-active");
170    searchToggle.on("click", function (e) {
171        e.preventDefault();
172        if ($(this).hasClass("open")) {
173            $(this).removeClass("open");
174            $(this).siblings(".categories-dropdown-active-large").removeClass("open");
175        } else {
176            $(this).addClass("open");
177            $(this).siblings(".categories-dropdown-active-large").addClass("open");
178        }
179    }); 
180    /*-------------------------------
181            Sort by active
182    -----------------------------------*/
183    if ($(".sort-by-product-area").length) {
184        var $body = $("body"),
185            $cartWrap = $(".sort-by-product-area"),
186            $cartContent = $cartWrap.find(".sort-by-dropdown");
187        $cartWrap.on("click", ".sort-by-product-wrap", function (e) {
188            e.preventDefault();
189            var $this = $(this);
190            if (!$this.parent().hasClass("show")) {
191                $this.siblings(".sort-by-dropdown").addClass("show").parent().addClass("show");
192            } else {
193                $this.siblings(".sort-by-dropdown").removeClass("show").parent().removeClass("show");
194            }
195        });
196        /*Close When Click Outside*/
197        $body.on("click", function (e) {
198            var $target = e.target;
199            if (!$($target).is(".sort-by-product-area") && !$($target).parents().is(".sort-by-product-area") && $cartWrap.hasClass("show")) {
200                $cartWrap.removeClass("show");
201                $cartContent.removeClass("show");
202            }
203        });
204    } 
205/*-----------------------
206    Shop filter active 
207------------------------- */
208    $(".shop-filter-toogle").on("click", function (e) {
209        e.preventDefault();
210        $(".shop-product-fillter-header").slideToggle();
211    });
212    var shopFiltericon = $(".shop-filter-toogle");
213    shopFiltericon.on("click", function () {
214        $(".shop-filter-toogle").toggleClass("active");
215    });
216
217    /*-------------------------------------
218        Product details big image slider
219    ---------------------------------------*/
220    if ($('.pro-dec-big-img-slider').length) {
221    $(".pro-dec-big-img-slider").owlCarousel({
222        slidesToShow: 1,
223        slidesToScroll: 1,
224        arrows: false,
225        draggable: false,
226        thumbs: false,
227        fade: false,
228        asNavFor: ".product-dec-slider-small , .product-dec-slider-small-2"
229    });
230    }
231/*---------------------------------------
232    Product details small image slider
233-----------------------------------------*/
234    if ($('.product-dec-slider-small').length) {
235    $(".product-dec-slider-small").owlCarousel({
236        slidesToShow: 4,
237        slidesToScroll: 1,
238        asNavFor: ".pro-dec-big-img-slider",
239        dots: false,
240        focusOnSelect: true,
241        fade: false,
242        thumbs: false,
243        arrows: false,
244        responsive: [
245            {
246                breakpoint: 991,
247                settings: {
248                    slidesToShow: 3
249                }
250            },
251            {
252                breakpoint: 767,
253                settings: {
254                    slidesToShow: 4
255                }
256            },
257            {
258                breakpoint: 575,
259                settings: {
260                    slidesToShow: 2
261                }
262            }
263        ]
264    });
265    } 
266    /*-----------------------------
267            SidebarSearch
268    -----------------------------*/
269    function sidebarSearch() {
270    var searchTrigger = $(".search-active"),
271        endTriggersearch = $(".search-close"),
272        container = $(".main-search-active");
273        searchTrigger.on("click", function (e) {
274            e.preventDefault();
275            container.addClass("search-visible");
276        });
277
278        endTriggersearch.on("click", function () {
279            container.removeClass("search-visible");
280        });
281    }
282    sidebarSearch();
283    /*-----------------------------
284            Sidebar menu Active
285    -----------------------------*/
286    function mobileHeaderActive() {
287        var navbarTrigger = $(".burger-icon"),
288            endTrigger = $(".mobile-menu-close"),
289            container = $(".mobile-header-active"),
290            wrapper4 = $("body");
291        wrapper4.prepend('<div class="body-overlay-1"></div>');
292        navbarTrigger.on("click", function (e) {
293            e.preventDefault();
294            container.addClass("sidebar-visible");
295            wrapper4.addClass("mobile-menu-active");
296        });
297        endTrigger.on("click", function () {
298            container.removeClass("sidebar-visible");
299            wrapper4.removeClass("mobile-menu-active");
300        });
301
302        $(".body-overlay-1").on("click", function () {
303            container.removeClass("sidebar-visible");
304            wrapper4.removeClass("mobile-menu-active");
305        });
306    }
307    mobileHeaderActive();
308
309    /*-------------------------
310        Mobile menu active
311    ------------------------ */
312    var $offCanvasNav = $(".mobile-menu"),
313        $offCanvasNavSubMenu = $offCanvasNav.find(".sub-menu");
314
315    /*Add Toggle Button With Off Canvas Sub Menu*/
316    $offCanvasNavSubMenu.parent().prepend('<span class="menu-expand"><i class="fi-rs-angle-small-down"></i></span>');
317
318    /*Close Off Canvas Sub Menu*/
319    $offCanvasNavSubMenu.slideUp();
320
321    /*Category Sub Menu Toggle*/
322    $offCanvasNav.on("click", "li a, li .menu-expand", function (e) {
323        var $this = $(this);
324        if (
325            $this
326                .parent()
327                .attr("class")
328                .match(/\b(menu-item-has-children|has-children|has-sub-menu)\b/) &&
329            ($this.attr("href") === "#" || $this.hasClass("menu-expand"))
330        ) {
331            e.preventDefault();
332            if ($this.siblings("ul:visible").length) {
333                $this.parent("li").removeClass("active");
334                $this.siblings("ul").slideUp();
335            } else {
336                $this.parent("li").addClass("active");
337                $this.closest("li").siblings("li").removeClass("active").find("li").removeClass("active");
338                $this.closest("li").siblings("li").find("ul:visible").slideUp();
339                $this.siblings("ul").slideDown();
340            }
341        }
342    });
343
344    /*--- language currency active ----*/
345    $(".mobile-language-active").on("click", function (e) {
346        e.preventDefault();
347        $(".lang-dropdown-active").slideToggle(900);
348    });
349
350    /*--- categories-button-active-2 ----*/
351    $(".categories-button-active-2").on("click", function (e) {
352        e.preventDefault();
353        $(".categori-dropdown-active-small").slideToggle(900);
354    });
355
356    /*--- Mobile demo active ----*/
357    var demo = $(".tm-demo-options-wrapper");
358    $(".view-demo-btn-active").on("click", function (e) {
359            e.preventDefault();
360            demo.toggleClass("demo-open");
361    });
362    /*-----------------------------
363            light box
364    -----------------------------*/
365    function nest_light_box() {
366        if ($('.lightbox-image').length) {
367            $('.lightbox-image').fancybox({
368                openEffect: 'fade',
369                closeEffect: 'fade',
370                helpers: {
371                    media: {}
372                }
373            });
374        }
375    }
376    /*-----------------------------
377            VSticker
378    -----------------------------*/
379    function nest_news_flash(){
380        if ($('.news-flash').length) {
381            var swiper = new Swiper(".news-flash", {
382                direction: "vertical",
383                autoHeight: true,
384                autoplay: {
385                delay: 1500,
386                disableOnInteraction: true,
387                },
388                slidesPerView: 1,
389                pagination: false,
390            });
391        }
392    }
393    if($('.side_bar_cart').length){
394        //Menu Toggle Btn
395        $('.cart_mb , .mb_cart').on('click', function() {
396        $('body').toggleClass('side_bar_cart-visible');
397        });
398        //Menu Toggle Btn
399        $('.side_bar_cart  .close_btn_mini , .side_bar_cart .cart_overlay').on('click', function() {
400        $('body').removeClass('side_bar_cart-visible');
401        });
402    }
403    /*-----------------------------
404            overflow
405    -----------------------------*/
406    function nest_product_description_overflow(){
407    $(document).ready(function() {
408        $('.list-features-six').each(function() {
409        var listFeatures = $(this);
410        if (listFeatures.height() > 100) {
411            listFeatures.addClass('scrollbarcolor');
412        }
413        });
414    });
415    }
416/* ==========================================================================
417Elementor front end start
418========================================================================== */
419$(window).on('elementor/frontend/init', function() {
420    // header v1
421    elementorFrontend.hooks.addAction('frontend/element_ready/nest-header-v1.default', nest_news_flash);
422    elementorFrontend.hooks.addAction('frontend/element_ready/nest-extra-header-items-v1.default', nest_news_flash);
423    // Slider v1
424    elementorFrontend.hooks.addAction('frontend/element_ready/nest-slider-v1.default', nest_slider_one);
425    // Content v1 
426    elementorFrontend.hooks.addAction('frontend/element_ready/nest-brand-v1.default', nest_theme_owl_carousel);
427    elementorFrontend.hooks.addAction('frontend/element_ready/nest-category-v1.default', nest_theme_owl_carousel);
428    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-tab-filter-carousel-v1.default', nest_theme_owl_carousel);
429    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-tab-filter-carousel-v1.default', nest_product_description_overflow);
430    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-carousel-v1.default', nest_product_description_overflow);
431    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-carousel-v1.default', nest_theme_owl_carousel);
432    elementorFrontend.hooks.addAction('frontend/element_ready/nest-testimonial-v1.default', nest_theme_owl_carousel);
433    elementorFrontend.hooks.addAction('frontend/element_ready/nest-blog-v1.default', nest_theme_owl_carousel);
434    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-tab-filter-carousel-v1.default', nest_tabtwo);
435    elementorFrontend.hooks.addAction('frontend/element_ready/nest-simple-image-box-v1.default', nest_theme_owl_carousel);
436    elementorFrontend.hooks.addAction('frontend/element_ready/nest-simple-image-box-v1.default', nest_theme_owl_carousel);
437    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-deals-v2.default', nest_theme_owl_carousel);
438    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-deals-v1.default', nest_deals);
439    elementorFrontend.hooks.addAction('frontend/element_ready/nest-product-deals-v2.default', nest_deals);
440    elementorFrontend.hooks.addAction('frontend/element_ready/nest-deals-v1.default', nest_deals);
441});
442    /*-----------------
443        Menu Stick
444    -----------------*/
445    function nest_sidemenu_content_bx() {
446        var header = $(".sidemenu_content_bx");
447        $(window).scroll(function() {    
448            var scroll = $(window).scrollTop();
449            if (scroll >= 600) {
450                header.addClass("scrolled");
451            } else {
452                header.removeClass("scrolled");
453            }
454        });
455    }
456    /*-----------------
457        Menu Stick
458    -----------------*/
459    function nest_sidemenu() {
460        if($(".sidemenu_area").length) {
461            //adding a new class on button element
462            $('#side_menu_toggle_btn').on('click',function () {
463                $('body').addClass('side_menu_toggled');   
464            });
465            //removing a existing class from button element
466            $('#side_menu_toggle_btn_close').on('click',function () {
467                $('body').removeClass('side_menu_toggled');
468            });
469        }
470    }
471
472    /*-----------------
473        Menu Stick
474    -----------------*/
475    function nest_filter_content() {
476        if($("body").length) {
477            //adding a new class on button element
478            $('.nest_filter_btn').on('click',function () {
479                $('body').addClass('nest_filter_side');   
480            });
481            //removing a existing class from button element
482            $('.nest_filter_btn_close , .body-overlay-1').on('click',function () {
483                $('body').removeClass('nest_filter_side');
484            });
485        }
486    }
487    /*-----------------
488        Menu Stick
489    -----------------*/
490    function nest_headerStyle() {
491		if($('.sticky_header_content').length){
492			var windowpos = $(window).scrollTop();
493			var siteHeader = $('.sticky_header_content');
494			var sticky_header = $('.sticky_header_content .sticky_header_default');
495			if (windowpos > 500) {
496				siteHeader.addClass('fixed-header');
497				sticky_header.addClass("wow animate__animated animate__slideInDown");
498			} else {
499				siteHeader.removeClass('fixed-header');
500				sticky_header.removeClass("wow animate__animated animate__slideInDown");
501			}
502		}
503	}
504    $(document).ready(function() {
505        var CurrentUrl = document.URL;
506        var CurrentUrlEnd = CurrentUrl.split('/').filter(Boolean).pop();
507        console.log(CurrentUrlEnd);
508        $(".wc-block-product-categories li a").each(function() {
509            var ThisUrl = $(this).attr('href');
510            var ThisUrlEnd = ThisUrl.split('/').filter(Boolean).pop();
511
512            if (ThisUrlEnd == CurrentUrlEnd) {
513                $(this).closest('.wc-block-product-categories li').addClass('current-cat-active')
514            }
515        });
516
517    });
518
519
520 
521  
522/* ==========================================================================
523    When document is Scrollig, do
524========================================================================== */
525$(window).on('scroll', function() {
526    nest_headerStyle();
527});
528
529$(window).on('load', function() {
530
531    if($('.counters').length){
532        $(".counters").counterUp({
533            delay: 10,
534            time: 2000
535        });
536    }
537
538if ($('.slick_slider_one').length) {
539    $('.slick_slider_one .flex-control-thumbs').slick({
540        dots: false,
541        infinite: false,
542        speed: 300,
543        slidesToShow: 4,
544        adaptiveHeight: false ,
545        arrows: true,
546        prevArrow: '<span class="slider-btn slider-prev"><i class="fi-rs-arrow-small-left"></i></span>',
547        nextArrow: '<span class="slider-btn slider-next"><i class="fi-rs-arrow-small-right"></i></span>',
548      
549    });
550}
551
552
553if ($('.slick_slider_two').length) {
554    $('.slick_slider_two .flex-control-thumbs').slick({
555        dots: false,
556        infinite: false,
557        speed: 300,
558        slidesToShow: 4,
559        adaptiveHeight: false ,
560        arrows: true,
561        vertical:true,
562        prevArrow: '<span class="slider-btn slider-prev"><i class="fi-rs-arrow-small-left"></i></span>',
563        nextArrow: '<span class="slider-btn slider-next"><i class="fi-rs-arrow-small-right"></i></span>',
564        responsive: [
565            {
566              breakpoint: 1024,
567              settings: {
568                slidesToShow: 4 ,
569              }
570            },
571            {
572              breakpoint: 600,
573              settings: {
574                slidesToShow: 2 ,
575              }
576            },
577            {
578              breakpoint: 480,
579              settings: {
580                slidesToShow: 3,
581              }
582            }
583            // You can unslick at a given breakpoint now by adding:
584            // settings: "unslick"
585            // instead of a settings object
586          ]
587    });
588}
589 
590//run when the DOM is ready
591$(".single_add_to_cart_button").click(function() {  //use a class, since your ID gets mangled
592      $(this).addClass("loading");      //add the class to the clicked element
593});
594    
595});
596
597
598$(window).load(function(){
599    var $promain = $(".wc-block-product-categories-list--depth-0"),
600    $pocat = $promain.find(".wc-block-product-categories-list");
601    /*Add Toggle Button With Off Canvas Sub Menu*/
602    $pocat.parent().prepend('<span class="menu-expand"><i class="fi-rs-angle-small-down"></i></span>');
603
604       /*Category Sub Menu Toggle*/
605       $promain.on("click", "li .menu-expand", function (e) {
606        var $this = $(this);
607        if ($this.hasClass("menu-expand")) {
608            e.preventDefault();
609            if ($this.siblings("ul:visible").length) {
610                $this.parent("li").removeClass("active");
611                $this.siblings("ul").slideUp();
612            } else {
613                $this.parent("li").addClass("active");
614                $this.closest("li").siblings("li").removeClass("active").find("li").removeClass("active");
615                $this.closest("li").siblings("li").find("ul:visible").slideUp();
616                $this.siblings("ul").slideDown();
617            }
618        }
619    });
620
621});
622
623 
624function nest_magnificPopup() {
625    $(document).ready(function() {
626        $('.popup-video').magnificPopup({
627            type: 'iframe',
628            mainClass: 'mfp-fade',
629            removalDelay: 160,
630            preloader: false,
631            fixedContentPos: true
632        });
633    });
634}
635document.addEventListener("DOMContentLoaded", function() {
636    var stickySection = document.querySelector(".sticky_sigle_add_to_cart");
637    var stickyTrigger = 750;
638
639    function updateStickyState() {
640        if (stickySection && window.scrollY > stickyTrigger) {
641            stickySection.classList.add("sticky-cart");
642        } else if (stickySection) {
643            stickySection.classList.remove("sticky-cart");
644        }
645    }
646
647    updateStickyState();
648    window.addEventListener("scroll", updateStickyState);
649});
650
651
652 
653
654/* ==========================================================================
655    When document is Scrollig, do
656========================================================================== */
657    jQuery(document).on('ready', function () {
658        (function ($) {
659            // add your functions
660            nest_slider_one();
661            nest_news_flash();
662            nest_theme_owl_carousel();
663            nest_tabtwo();
664            nest_light_box();
665            nest_sidemenu_content_bx();
666            nest_sidemenu();
667            nest_product_single_slider(); 
668            nest_deals()
669            nest_magnificPopup();
670            nest_filter_content();
671            nest_product_description_overflow();
672        
673        })(jQuery);
674    });
675    $(window).load(function(){
676        $(".widget  select").select2();
677    });
678 
679
680})(jQuery);
681

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.