PageSourceSearch

https://immitrics.com/wp-content/themes/evisa/assets/js/main.js?ver=1.0.0

js immitrics.com collected 2026-10-08 19:25:50 UTC 15,048 bytes, 448 lines download raw bytes

1(function ($) {
2    "use strict";
3
4    $(window).on('load', function () {
5        preloader();
6        wowAnimation();
7    });
8
9    // preloader
10    function preloader() {
11        $('#xb-loadding').delay().fadeOut();
12    };
13
14    // back to top - start
15    // --------------------------------------------------
16    $(window).scroll(function () {
17        if ($(this).scrollTop() > 500) {
18            $('.xb-backtotop').addClass('active');
19        } else {
20            $('.xb-backtotop').removeClass('active');
21        }
22    });
23    $(function () {
24        $(".scroll").on('click', function () {
25            $("html,body").animate({scrollTop: 0}, "slow");
26            return false
27        });
28    });
29    // back to top - end
30    // --------------------------------------------------
31
32    // sticky header
33    if ($('.stricky').length) {
34        $('.stricky').addClass('original').clone(true).insertAfter('.stricky').addClass('stricked-menu').removeClass('original');
35    }
36    $(window).on('scroll', function () {
37        if ($('.stricked-menu').length) {
38            var headerScrollPos = 100;
39            var stricky = $('.stricked-menu');
40            if ($(window).scrollTop() > headerScrollPos) {
41                stricky.addClass('stricky-fixed');
42            } else if ($(this).scrollTop() <= headerScrollPos) {
43                stricky.removeClass('stricky-fixed');
44            }
45        }
46    });
47
48    //=======================
49    // header search
50    $(".header-search-btn").on("click", function (e) {
51        e.preventDefault();
52        $(".header-search-form-wrapper").addClass("open");
53        $('.header-search-form-wrapper input[type="search"]').focus();
54        $('.body-overlay').addClass('active');
55    });
56    $(".xb-search-close").on("click", function (e) {
57        e.preventDefault();
58        $(".header-search-form-wrapper").removeClass("open");
59        $("body").removeClass("active");
60        $('.body-overlay').removeClass('active');
61    });
62
63
64    // sidebar info start
65    // --------------------------------------------------
66    $('.sidebar-menu-close, .body-overlay').on('click', function () {
67        $('.offcanvas-sidebar').removeClass('active');
68        $('.body-overlay').removeClass('active');
69    });
70
71    $('.offcanvas-sidebar-btn').on('click', function () {
72        $('.offcanvas-sidebar').addClass('active');
73        $('.body-overlay').addClass('active');
74    });
75
76    $('.body-overlay').on('click', function () {
77        $(this).removeClass('active');
78        $(".header-search-form-wrapper").removeClass("open");
79    });
80
81
82    // mobile menu
83    // --------------------------------------------------
84    $('.xb-nav-hidden li.menu-item-has-children > a').append('<span class="xb-menu-toggle"></span>');
85    $('.xb-header-menu li.menu-item-has-children, .xb-menu-primary li.menu-item-has-children').append('<span class="xb-menu-toggle"></span>');
86    $('.xb-menu-toggle').on('click', function () {
87        if (!$(this).hasClass('active')) {
88            $(this).closest('ul').find('.xb-menu-toggle.active').toggleClass('active');
89            $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
90        }
91        $(this).toggleClass('active');
92        $(this).closest('.menu-item').find('> .sub-menu').toggleClass('active');
93        $(this).closest('.menu-item').find('> .sub-menu').slideToggle();
94    });
95
96    $('.xb-nav-hidden li.menu-item-has-children > a').click(function (e) {
97        var target = $(e.target);
98        if ($(this).attr('href') === '#' && !(target.is('.xb-menu-toggle'))) {
99            e.stopPropagation();
100            if (!$(this).find('.xb-menu-toggle').hasClass('active')) {
101                $(this).closest('ul').find('.xb-menu-toggle.active').toggleClass('active');
102                $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle();
103            }
104            $(this).find('.xb-menu-toggle').toggleClass('active');
105            $(this).closest('.menu-item').find('> .sub-menu').toggleClass('active');
106            $(this).closest('.menu-item').find('> .sub-menu').slideToggle();
107        }
108    });
109    $(".xb-nav-mobile").on('click', function () {
110        $(this).toggleClass('active');
111        $('.xb-header-menu').toggleClass('active');
112    });
113
114    $(".xb-menu-close, .xb-header-menu-backdrop").on('click', function () {
115        $(this).removeClass('active');
116        $('.xb-header-menu').removeClass('active');
117    });
118    /* End Menu Mobile */
119
120
121    //data background
122    $("[data-background]").each(function () {
123        $(this).css("background-image", "url(" + $(this).attr("data-background") + ") ")
124    })
125
126    // data bg color
127    $("[data-bg-color]").each(function () {
128        $(this).css("background-color", $(this).attr("data-bg-color"));
129
130    });
131
132    function wowAnimation() {
133        var wow = new WOW({
134            boxClass: 'wow',
135            animateClass: 'animated',
136            offset: 0,
137            mobile: false,
138            live: true
139        });
140        wow.init();
141    }
142
143    // xbo counter start
144    function xboActive($scope, $) {
145        if ($(".xbo").length) {
146            $('.xbo').appear();
147            $(document.body).on('appear', '.xbo', function (e) {
148                var odo = $(".xbo");
149                odo.each(function () {
150                    var countNumber = $(this).attr("data-count");
151                    $(this).html(countNumber);
152                });
153                window.xboOptions = {
154                    format: 'd',
155                };
156            });
157        }
158    }
159
160    // xbo counter end
161
162    // isotop
163    function isotopActive($scope, $) {
164        $('.grid').imagesLoaded(function () {
165            // init Isotope
166            var $grid = $('.grid').isotope({
167                itemSelector: '.grid-item',
168                percentPosition: true,
169                masonry: {
170                    // use outer width of grid-sizer for columnWidth
171                    columnWidth: '.grid-item',
172                }
173            });
174        });
175    }
176
177    // post gallery slider
178    var slider = new Swiper('.post-gallery-slider', {
179        spaceBetween: 0,
180        slidesPerView: 1,
181        centeredSlides: true,
182        roundLengths: true,
183        loop: true,
184        loopAdditionalSlides: 30,
185        autoplay: {
186            enabled: true,
187            delay: 6000
188        },
189        navigation: {
190            nextEl: ".post-gallery-button-next",
191            prevEl: ".post-gallery-button-prev",
192        },
193        speed: 400,
194    });
195
196    // brand slider
197    function brandActive($scope, $) {
198        var slider = new Swiper('.brand-slider .swiper-container', {
199            slidesPerView: 7,
200            roundLengths: true,
201            loop: true,
202            centeredSlides: true,
203            loopAdditionalSlides: 30,
204            watchSlidesVisibility: true,
205            slideVisibleClass: 'swiper-slide-visible',
206            autoplay: {
207                enabled: true,
208                delay: 6000
209            },
210            speed: 400,
211            breakpoints: {
212                '1600': {
213                    slidesPerView: 7,
214                },
215                '1200': {
216                    slidesPerView: 6,
217                },
218                '992': {
219                    slidesPerView: 5,
220                    centeredSlides: false,
221                },
222                '768': {
223                    slidesPerView: 4,
224                    centeredSlides: false,
225                },
226                '576': {
227                    slidesPerView: 3,
228                    centeredSlides: false,
229                },
230                '0': {
231                    slidesPerView: 2,
232                },
233            },
234        });
235    }
236
237    // testimonial slider
238    function testimonialActive($scope, $) {
239        var slider = new Swiper('.xb-testimonial-slider', {
240            spaceBetween: 34,
241            slidesPerView: 2,
242            roundLengths: true,
243            loop: true,
244            loopAdditionalSlides: 30,
245            watchSlidesVisibility: true,
246            slideVisibleClass: 'swiper-slide-visible',
247            navigation: {
248                nextEl: ".tm-button-next",
249                prevEl: ".tm-button-prev",
250            },
251            autoplay: {
252                enabled: true,
253                delay: 6000
254            },
255            speed: 400,
256            breakpoints: {
257                '1600': {
258                    slidesPerView: 2,
259                },
260                '1200': {
261                    slidesPerView: 2,
262                },
263                '992': {
264                    slidesPerView: 2,
265                },
266                '768': {
267                    slidesPerView: 2,
268                },
269                '576': {
270                    slidesPerView: 2,
271                },
272                '0': {
273                    slidesPerView: 1,
274                },
275            },
276        });
277    }
278
279    // testimonial slider
280    function testimonialActiveV3($scope, $) {
281        var slider = new Swiper('.xb-testimonial-slider2', {
282            spaceBetween: 30,
283            slidesPerView: 3,
284            roundLengths: true,
285            loop: true,
286            loopAdditionalSlides: 30,
287            watchSlidesVisibility: true,
288            autoplay: {
289                enabled: true,
290                delay: 6000
291            },
292            speed: 400,
293            breakpoints: {
294                '1600': {
295                    slidesPerView: 3,
296                },
297                '1200': {
298                    slidesPerView: 3,
299                },
300                '992': {
301                    slidesPerView: 2,
302                },
303                '768': {
304                    slidesPerView: 2,
305                },
306                '576': {
307                    slidesPerView: 2,
308                },
309                '0': {
310                    slidesPerView: 1,
311                },
312            },
313        });
314    }
315
316    // country slider
317    function countryActive($scope, $) {
318        var slider = new Swiper('.xb-country-slide', {
319            slidesPerView: 6,
320            roundLengths: true,
321            loop: true,
322            loopAdditionalSlides: 30,
323            watchSlidesVisibility: true,
324            slideVisibleClass: 'swiper-slide-visible',
325            autoplay: {
326                enabled: true,
327                delay: 6000
328            },
329            speed: 400,
330            breakpoints: {
331                '1600': {
332                    slidesPerView: 6,
333                },
334                '1200': {
335                    slidesPerView: 6,
336                },
337                '992': {
338                    slidesPerView: 5,
339                },
340                '768': {
341                    slidesPerView: 4,
342                },
343                '576': {
344                    slidesPerView: 3,
345                },
346                '0': {
347                    slidesPerView: 2,
348                },
349            },
350        });
351    }
352
353    // category slider
354    function categoryActive($scope, $) {
355        var slider = new Swiper('.xb-category-slider', {
356            spaceBetween: 30,
357            slidesPerView: 7,
358            roundLengths: true,
359            loop: true,
360            loopAdditionalSlides: 30,
361            watchSlidesVisibility: true,
362            autoplay: {
363                enabled: true,
364                delay: 6000
365            },
366            speed: 400,
367            breakpoints: {
368                '1600': {
369                    slidesPerView: 7,
370                },
371                '1200': {
372                    slidesPerView: 6,
373                },
374                '992': {
375                    slidesPerView: 5,
376                },
377                '768': {
378                    slidesPerView: 4,
379                },
380                '576': {
381                    slidesPerView: 3,
382                },
383                '0': {
384                    slidesPerView: 2,
385                },
386            },
387        });
388    }
389
390    // nice select
391    $('.nice-select').niceSelect();
392
393    /* magnificPopup img view */
394    $('.popup-image').magnificPopup({
395        type: 'image',
396        gallery: {
397            enabled: true
398        }
399    });
400
401    /* magnificPopup video view */
402    $('.popup-video').magnificPopup({
403        type: 'iframe',
404        mainClass: 'mfp-zoom-in',
405    });
406
407    // Accordion Box start
408    if ($(".accordion_box").length) {
409        $(".accordion_box").on("click", ".acc-btn", function () {
410            var outerBox = $(this).parents(".accordion_box");
411            var target = $(this).parents(".accordion");
412
413            if ($(this).next(".acc_body").is(":visible")) {
414                $(this).removeClass("active");
415                $(this).next(".acc_body").slideUp(300);
416                $(outerBox).children(".accordion").removeClass("active-block");
417            } else {
418                $(outerBox).find(".accordion .acc-btn").removeClass("active");
419                $(this).addClass("active");
420                $(outerBox).children(".accordion").removeClass("active-block");
421                $(outerBox).find(".accordion").children(".acc_body").slideUp(300);
422                target.addClass("active-block");
423                $(this).next(".acc_body").slideDown(300);
424            }
425        });
426    }
427    // Accordion Box end
428
429    // datepicker
430    $(".datepicker").datepicker();
431
432    $(window).on('elementor/frontend/init', function () {
433        elementorFrontend.hooks.addAction('frontend/element_ready/int-brand.default', brandActive);
434        elementorFrontend.hooks.addAction('frontend/element_ready/int-funfact.default', xboActive);
435        elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial.default', testimonialActive);
436        elementorFrontend.hooks.addAction('frontend/element_ready/int-funfact-v2.default', xboActive);
437        elementorFrontend.hooks.addAction('frontend/element_ready/int-country-v2.default', countryActive);
438        elementorFrontend.hooks.addAction('frontend/element_ready/int-categories.default', categoryActive);
439        elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial-v3.default', testimonialActiveV3);
440        elementorFrontend.hooks.addAction('frontend/element_ready/int-funfact-v3.default', xboActive);
441        elementorFrontend.hooks.addAction('frontend/element_ready/int-blog-v4.default', testimonialActive);
442        elementorFrontend.hooks.addAction('frontend/element_ready/int-brand-v3.default', categoryActive);
443        elementorFrontend.hooks.addAction('frontend/element_ready/int-skills.default', xboActive);
444        elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial-v4.default', isotopActive);
445    });
446
447})(jQuery);
448

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.