PageSourceSearch

https://allcomtelecom.com/js/main.js

js allcomtelecom.com collected 2026-10-05 11:03:21 UTC 37,031 bytes, 1,098 lines download raw bytes

1(function ($) {
2    "use strict";
3    /*=================================
4      JS Index Here
5    ==================================*/
6    /*
7    01. On Load Function
8    02. Preloader
9    03. Mobile Menu Active
10    04. Sticky fix
11    05. Scroll To Top
12    06. Set Background Image Color & Mask
13    07. Global Slider
14    08. Custom Animaiton For Slider
15    09. Ajax Contact Form
16    10. Search Box Popup
17    11. Popup Sidemenu
18    12. Magnific Popup
19    13. Section Position
20    14. Filter
21    15. Counter Up
22    16. AS Tab
23    17. Shape Mockup
24    18. Progress Bar Animation
25    19. Price Slider
26    20. Tilt Active
27    21. Indicator
28    22. Circle Progress
29    00. Woocommerce Toggle
30    00. Right Click Disable
31  */
32    /*=================================
33      JS Index End
34  ==================================*/
35
36    $(document).ready(function () {
37
38        var offset = $(window).scrollTop() > 500 ? 110 : 235;
39
40        let hash = window.location.hash;
41        if (hash) {
42            // history.replaceState(true, '', '#your-hash')
43            var dest = $(hash);
44            if (!dest.length) return;
45            $('html,body').animate({
46                scrollTop: $(dest).offset().top - offset
47            }, 500);
48        }
49
50        $('a[href^="#"]').click(function (e) {
51            e.preventDefault();
52            var dest = $(this).attr('href');
53
54            if (dest === '#') {
55                $('html,body').animate({ scrollTop: 0 }, 500);
56            }
57            else {
58                $('html,body').animate({
59                    scrollTop: $(dest).offset().top - offset
60                }, 500);
61            }
62        });
63
64    })
65
66    /*---------- 01. On Load Function ----------*/
67    $(window).on("load", function () {
68        $(".preloader").fadeOut();
69    });
70
71    /*---------- 02. Preloader ----------*/
72    if ($(".preloader").length > 0) {
73        $(".preloaderCls").each(function () {
74            $(this).on("click", function (e) {
75                e.preventDefault();
76                $(".preloader").css("display", "none");
77            });
78        });
79    }
80
81    /*---------- 03. Mobile Menu Active ----------*/
82    $.fn.thmobilemenu = function (options) {
83        var opt = $.extend(
84            {
85                menuToggleBtn: ".th-menu-toggle",
86                bodyToggleClass: "th-body-visible",
87                subMenuClass: "th-submenu",
88                subMenuParent: "th-item-has-children",
89                subMenuParentToggle: "th-active",
90                meanExpandClass: "th-mean-expand",
91                appendElement: '<span class="th-mean-expand"></span>',
92                subMenuToggleClass: "th-open",
93                toggleSpeed: 400,
94            },
95            options
96        );
97
98        return this.each(function () {
99            var menu = $(this); // Select menu
100
101            // Menu Show & Hide
102            function menuToggle() {
103                menu.toggleClass(opt.bodyToggleClass);
104
105                // collapse submenu on menu hide or show
106                var subMenu = "." + opt.subMenuClass;
107                $(subMenu).each(function () {
108                    if ($(this).hasClass(opt.subMenuToggleClass)) {
109                        $(this).removeClass(opt.subMenuToggleClass);
110                        $(this).css("display", "none");
111                        $(this).parent().removeClass(opt.subMenuParentToggle);
112                    }
113                });
114            }
115
116            // Class Set Up for every submenu
117            menu.find("li").each(function () {
118                var submenu = $(this).find("ul");
119                submenu.addClass(opt.subMenuClass);
120                submenu.css("display", "none");
121                submenu.parent().addClass(opt.subMenuParent);
122                submenu.prev("a").append(opt.appendElement);
123                submenu.next("a").append(opt.appendElement);
124            });
125
126            // Toggle Submenu
127            function toggleDropDown($element) {
128                if ($($element).next("ul").length > 0) {
129                    $($element).parent().toggleClass(opt.subMenuParentToggle);
130                    $($element).next("ul").slideToggle(opt.toggleSpeed);
131                    $($element).next("ul").toggleClass(opt.subMenuToggleClass);
132                } else if ($($element).prev("ul").length > 0) {
133                    $($element).parent().toggleClass(opt.subMenuParentToggle);
134                    $($element).prev("ul").slideToggle(opt.toggleSpeed);
135                    $($element).prev("ul").toggleClass(opt.subMenuToggleClass);
136                }
137            }
138
139            // Submenu toggle Button
140            var expandToggler = "." + opt.meanExpandClass;
141            $(expandToggler).each(function () {
142                $(this).off("click").on("click", function (e) {
143                    e.preventDefault();
144                    toggleDropDown($(this).parent());
145                });
146            });
147
148            // Menu Show & Hide On Toggle Btn click
149            $(opt.menuToggleBtn).each(function () {
150                $(this).off("click").on("click", function (e) {
151                    e.stopPropagation();
152                    menuToggle();
153                    // alert('click')
154                });
155            });
156
157            // Hide Menu On out side click
158            menu.off("click").on("click", function (e) {
159                e.stopPropagation();
160                menuToggle();
161            });
162
163            // Stop Hide full menu on menu click
164            menu.find("div").off("click").on("click", function (e) {
165                e.stopPropagation();
166            });
167        });
168    };
169
170    $(".th-menu-wrapper").thmobilemenu();
171
172    /*---------- 04. Sticky fix ----------*/
173    // $(window).scroll(function () {
174    //     var topPos = $(this).scrollTop();
175    //     if (topPos > 500) {
176    //         $('.sticky-wrapper').addClass('sticky');
177    //     } else {
178    //         $('.sticky-wrapper').removeClass('sticky')
179    //     }
180    // })
181
182    /*----------- 04.1.  One Page Nav ----------*/
183    function onePageNav(element) {
184        if ($(element).length > 0) {
185            $(element).each(function () {
186                var link = $(this).find('a');
187                $(this).find(link).each(function () {
188                    $(this).on('click', function () {
189                        var target = $(this.getAttribute('href'));
190                        if (target.length) {
191                            event.preventDefault();
192                            $('html, body').stop().animate({
193                                scrollTop: target.offset().top - 10
194                            }, 1000);
195                        };
196
197                    });
198                });
199            })
200        }
201    };
202    onePageNav('.onepage-nav');
203    onePageNav('.scroll-down');
204
205    /*---------- 05. Scroll To Top ----------*/
206    // progressAvtivation
207    if ($('.scroll-top')) {
208
209        var scrollTopbtn = document.querySelector('.scroll-top');
210
211        var offset = 50;
212        var duration = 750;
213        jQuery(window).on('scroll', function () {
214            if (jQuery(this).scrollTop() > offset) {
215                jQuery(scrollTopbtn).addClass('show');
216            } else {
217                jQuery(scrollTopbtn).removeClass('show');
218            }
219        });
220        jQuery(scrollTopbtn).on('click', function (event) {
221            event.preventDefault();
222            jQuery('html, body').animate({ scrollTop: 0 }, duration);
223            return false;
224        })
225    }
226
227    /*---------- 06. Set Background Image Color & Mask ----------*/
228    if ($("[data-bg-src]").length > 0) {
229        $("[data-bg-src]").each(function () {
230            var src = $(this).attr("data-bg-src");
231            $(this).css("background-image", "url(" + src + ")");
232            $(this).removeAttr("data-bg-src").addClass("background-image");
233        });
234    }
235
236    if ($('[data-bg-color]').length > 0) {
237        $('[data-bg-color]').each(function () {
238            var color = $(this).attr('data-bg-color');
239            $(this).css('background-color', color);
240            $(this).removeAttr('data-bg-color');
241        });
242    };
243
244    $('[data-border]').each(function () {
245        var borderColor = $(this).data('border');
246        $(this).css('--th-border-color', borderColor);
247    });
248
249    if ($('[data-mask-src]').length > 0) {
250        $('[data-mask-src]').each(function () {
251            var mask = $(this).attr('data-mask-src');
252            $(this).css({
253                'mask-image': 'url(' + mask + ')',
254                '-webkit-mask-image': 'url(' + mask + ')'
255            });
256            $(this).addClass('bg-mask');
257            $(this).removeAttr('data-mask-src');
258        });
259    };
260
261
262
263    /*----------- 07. Global Slider ----------*/
264
265    $('.th-slider').each(function () {
266
267        var thSlider = $(this);
268        var settings = $(this).data('slider-options');
269
270        // Store references to the navigation Slider
271        var prevArrow = thSlider.find('.slider-prev');
272        var nextArrow = thSlider.find('.slider-next');
273        var paginationEl = thSlider.find('.slider-pagination');
274
275        var autoplayconditon = settings['autoplay'];
276
277        var sliderDefault = {
278            slidesPerView: 1,
279            spaceBetween: settings['spaceBetween'] ? settings['spaceBetween'] : 24,
280            loop: settings['loop'] == false ? false : true,
281            speed: settings['speed'] ? settings['speed'] : 1000,
282            autoplay: autoplayconditon ? autoplayconditon : { delay: 6000, disableOnInteraction: false },
283            navigation: {
284                nextEl: nextArrow.get(0),
285                prevEl: prevArrow.get(0),
286            },
287            pagination: {
288                el: paginationEl.get(0),
289                clickable: true,
290                renderBullet: function (index, className) {
291                    return '<span class="' + className + '" aria-label="Go to Slide ' + (index + 1) + '"></span>';
292                },
293            },
294        };
295
296        var options = JSON.parse(thSlider.attr('data-slider-options'));
297        options = $.extend({}, sliderDefault, options);
298        var swiper = new Swiper(thSlider.get(0), options); // Assign the swiper variable
299
300        if ($('.slider-area').length > 0) {
301            $('.slider-area').closest(".container").parent().addClass("arrow-wrap");
302        }
303
304    });
305
306    // Function to add animation classes
307    function animationProperties() {
308        $('[data-ani]').each(function () {
309            var animationName = $(this).data('ani');
310            $(this).addClass(animationName);
311        });
312
313        $('[data-ani-delay]').each(function () {
314            var delayTime = $(this).data('ani-delay');
315            $(this).css('animation-delay', delayTime);
316        });
317    }
318    animationProperties();
319
320    // Add click event handlers for external slider arrows based on data attributes
321    $('[data-slider-prev], [data-slider-next]').on('click', function () {
322        var sliderSelector = $(this).data('slider-prev') || $(this).data('slider-next');
323        var targetSlider = $(sliderSelector);
324
325        if (targetSlider.length) {
326            var swiper = targetSlider[0].swiper;
327
328            if (swiper) {
329                if ($(this).data('slider-prev')) {
330                    swiper.slidePrev();
331                } else {
332                    swiper.slideNext();
333                }
334            }
335        }
336    });
337
338    /*-------------- 08. Slider Tab -------------*/
339    $.fn.activateSliderThumbs = function (options) {
340        var opt = $.extend(
341            {
342                sliderTab: false,
343                tabButton: ".tab-btn",
344            },
345            options
346        );
347
348        return this.each(function () {
349            var $container = $(this);
350            var $thumbs = $container.find(opt.tabButton);
351            var $line = $('<span class="indicator"></span>').appendTo($container);
352
353            var sliderSelector = $container.data("slider-tab");
354            var $slider = $(sliderSelector);
355
356            var swiper = $slider[0].swiper;
357
358            $thumbs.on("click", function (e) {
359                e.preventDefault();
360                var clickedThumb = $(this);
361
362                clickedThumb.addClass("active").siblings().removeClass("active");
363                linePos(clickedThumb, $container);
364
365                if (opt.sliderTab) {
366                    var slideIndex = clickedThumb.index();
367                    swiper.slideTo(slideIndex);
368                }
369            });
370
371            if (opt.sliderTab) {
372                swiper.on("slideChange", function () {
373                    var activeIndex = swiper.realIndex;
374                    var $activeThumb = $thumbs.eq(activeIndex);
375
376                    $activeThumb.addClass("active").siblings().removeClass("active");
377                    linePos($activeThumb, $container);
378                });
379
380                var initialSlideIndex = swiper.activeIndex;
381                var $initialThumb = $thumbs.eq(initialSlideIndex);
382                $initialThumb.addClass("active").siblings().removeClass("active");
383                linePos($initialThumb, $container);
384            }
385
386            function linePos($activeThumb) {
387                var thumbOffset = $activeThumb.position();
388
389                var marginTop = parseInt($activeThumb.css('margin-top')) || 0;
390                var marginLeft = parseInt($activeThumb.css('margin-left')) || 0;
391
392                $line.css("--height-set", $activeThumb.outerHeight() + "px");
393                $line.css("--width-set", $activeThumb.outerWidth() + "px");
394                $line.css("--pos-y", thumbOffset.top + marginTop + "px");
395                $line.css("--pos-x", thumbOffset.left + marginLeft + "px");
396            }
397        });
398    };
399
400    if ($(".testi-thumb").length) {
401        $(".testi-thumb").activateSliderThumbs({
402            sliderTab: true,
403            tabButton: ".tab-btn",
404        });
405    }
406
407    /*----------- 09. Ajax Contact Form ----------*/
408    var form = ".ajax-contact";
409    var invalidCls = "is-invalid";
410    var $email = '[name="email"]';
411    var $validation =
412        '[name="name"],[name="email"],[name="subject"],[name="number"],[name="message"]'; // Must be use (,) without any space
413    var formMessages = $(".form-messages");
414
415    function sendContact() {
416        var formData = $(form).serialize();
417        var valid;
418        valid = validateContact();
419        if (valid) {
420            jQuery
421                .ajax({
422                    url: $(form).attr("action"),
423                    data: formData,
424                    type: "POST",
425                })
426                .done(function (response) {
427                    // Make sure that the formMessages div has the 'success' class.
428                    formMessages.removeClass("error");
429                    formMessages.addClass("success");
430                    // Set the message text.
431                    formMessages.text(response);
432                    // Clear the form.
433                    $(
434                        form +
435                        ' input:not([type="submit"]),' +
436                        form +
437                        " textarea"
438                    ).val("");
439                })
440                .fail(function (data) {
441                    // Make sure that the formMessages div has the 'error' class.
442                    formMessages.removeClass("success");
443                    formMessages.addClass("error");
444                    // Set the message text.
445                    if (data.responseText !== "") {
446                        formMessages.html(data.responseText);
447                    } else {
448                        formMessages.html(
449                            "Oops! An error occured and your message could not be sent."
450                        );
451                    }
452                });
453        }
454    }
455
456    function validateContact() {
457        var valid = true;
458        var formInput;
459
460        function unvalid($validation) {
461            $validation = $validation.split(",");
462            for (var i = 0; i < $validation.length; i++) {
463                formInput = form + " " + $validation[i];
464                if (!$(formInput).val()) {
465                    $(formInput).addClass(invalidCls);
466                    valid = false;
467                } else {
468                    $(formInput).removeClass(invalidCls);
469                    valid = true;
470                }
471            }
472        }
473        unvalid($validation);
474
475        if (
476            !$($email).val() ||
477            !$($email)
478                .val()
479                .match(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/)
480        ) {
481            $($email).addClass(invalidCls);
482            valid = false;
483        } else {
484            $($email).removeClass(invalidCls);
485            valid = true;
486        }
487        return valid;
488    }
489
490    $(form).on("submit", function (element) {
491        element.preventDefault();
492        sendContact();
493    });
494
495    /*---------- 10. Search Box Popup ----------*/
496    function popupSarchBox($searchBox, $searchOpen, $searchCls, $toggleCls) {
497        $($searchOpen).on("click", function (e) {
498            e.preventDefault();
499            $($searchBox).addClass($toggleCls);
500        });
501        $($searchBox).on("click", function (e) {
502            e.stopPropagation();
503            $($searchBox).removeClass($toggleCls);
504        });
505        $($searchBox)
506            .find("form")
507            .on("click", function (e) {
508                e.stopPropagation();
509                $($searchBox).addClass($toggleCls);
510            });
511        $($searchCls).on("click", function (e) {
512            e.preventDefault();
513            e.stopPropagation();
514            $($searchBox).removeClass($toggleCls);
515        });
516    }
517    popupSarchBox(
518        ".popup-search-box",
519        ".searchBoxToggler",
520        ".searchClose",
521        "show"
522    );
523
524    /*---------- 11. Popup Sidemenu ----------*/
525    function popupSideMenu($sideMenu, $sideMunuOpen, $sideMenuCls, $toggleCls) {
526        // Sidebar Popup
527        $($sideMunuOpen).on('click', function (e) {
528            e.preventDefault();
529            $($sideMenu).addClass($toggleCls);
530        });
531        $($sideMenu).on('click', function (e) {
532            e.stopPropagation();
533            $($sideMenu).removeClass($toggleCls)
534        });
535        var sideMenuChild = $sideMenu + ' > div';
536        $(sideMenuChild).on('click', function (e) {
537            e.stopPropagation();
538            $($sideMenu).addClass($toggleCls)
539        });
540        $($sideMenuCls).on('click', function (e) {
541            e.preventDefault();
542            e.stopPropagation();
543            $($sideMenu).removeClass($toggleCls);
544        });
545    };
546    popupSideMenu('.sidemenu-wrapper', '.sideMenuToggler', '.sideMenuCls', 'show');
547
548    /*----------- 12. Magnific Popup ----------*/
549    /* magnificPopup img view */
550    $(".popup-image").magnificPopup({
551        type: "image",
552        mainClass: 'mfp-zoom-in',
553        removalDelay: 260,
554        gallery: {
555            enabled: true,
556        },
557    });
558
559    /* magnificPopup video view */
560    $(".popup-video").magnificPopup({
561        type: "iframe",
562        mainClass: 'mfp-zoom-in',
563        removalDelay: 260,
564    });
565
566    /* magnificPopup video view */
567    $(".popup-content").magnificPopup({
568        type: "inline",
569        midClick: true,
570    });
571
572    /*  footer animation  */
573    $(".th-screen").length && $(window).on("scroll", function () {
574        ! function (t, a = 0) {
575            var i = $(window).scrollTop(),
576                o = i + $(window).height(),
577                s = $(t).offset().top;
578            return s + $(t).height() - parseInt(a) <= o && s >= i
579        }
580            (".th-screen", 200) ? $(".th-screen").removeClass("th-visible") : $(".th-screen").addClass("th-visible")
581    }),
582
583
584        function content_ready_scripts() {
585            const boxes = gsap.utils.toArray('.global-image');
586            boxes.forEach(img => {
587                gsap.to(img, {
588                    scrollTrigger: {
589                        trigger: img,
590                        start: "top 70%",
591                        end: "bottom bottom",
592                        toggleClass: "active",
593                        once: true,
594                    }
595                });
596            });
597        }
598
599    if ($('.th-anim').length) {
600        gsap.registerPlugin(ScrollTrigger);
601        let revealContainers = document.querySelectorAll(".th-anim");
602        revealContainers.forEach((container) => {
603            let image = container.querySelector("img");
604            let tl = gsap.timeline({
605                scrollTrigger: {
606                    trigger: container,
607                    toggleActions: "play none none none"
608                }
609            });
610            tl.set(container, { autoAlpha: 1 });
611            tl.from(container, 1.5, {
612                xPercent: -100,
613                ease: Power2.out
614            });
615            tl.from(image, 1.5, {
616                xPercent: 100,
617                scale: 1.3,
618                delay: -1.5,
619                ease: Power2.out
620            });
621        });
622    }
623
624
625    /*---------- 13. Section Position ----------*/
626    // Interger Converter
627    function convertInteger(str) {
628        return parseInt(str, 10);
629    }
630
631    $.fn.sectionPosition = function (mainAttr, posAttr) {
632        $(this).each(function () {
633            var section = $(this);
634
635            function setPosition() {
636                var sectionHeight = Math.floor(section.height() / 2), // Main Height of section
637                    posData = section.attr(mainAttr), // where to position
638                    posFor = section.attr(posAttr), // On Which section is for positioning
639                    topMark = "top-half", // Pos top
640                    bottomMark = "bottom-half", // Pos Bottom
641                    parentPT = convertInteger($(posFor).css("padding-top")), // Default Padding of  parent
642                    parentPB = convertInteger($(posFor).css("padding-bottom")); // Default Padding of  parent
643
644                if (posData === topMark) {
645                    $(posFor).css(
646                        "padding-bottom",
647                        parentPB + sectionHeight + "px"
648                    );
649                    section.css("margin-top", "-" + sectionHeight + "px");
650                } else if (posData === bottomMark) {
651                    $(posFor).css(
652                        "padding-top",
653                        parentPT + sectionHeight + "px"
654                    );
655                    section.css("margin-bottom", "-" + sectionHeight + "px");
656                }
657            }
658            setPosition(); // Set Padding On Load
659        });
660    };
661
662    var postionHandler = "[data-sec-pos]";
663    if ($(postionHandler).length) {
664        $(postionHandler).imagesLoaded(function () {
665            $(postionHandler).sectionPosition("data-sec-pos", "data-pos-for");
666        });
667    }
668
669    /*----------- 14. Filter ----------*/
670    /*----------- 15. Filter ----------*/
671    $(".filter-active").imagesLoaded(function () {
672        var $filter = ".filter-active",
673            $filterItem = ".filter-item",
674            $filterMenu = ".filter-menu-active";
675
676        if ($($filter).length > 0) {
677            var $grid = $($filter).isotope({
678                itemSelector: $filterItem,
679                filter: "*",
680                masonry: {
681                    // use outer width of grid-sizer for columnWidth
682                    columnWidth: 1,
683                },
684            });
685
686            // filter items on button click
687            $($filterMenu).on("click", "button", function () {
688                var filterValue = $(this).attr("data-filter");
689                $grid.isotope({
690                    filter: filterValue,
691                });
692            });
693
694            // Menu Active Class
695            $($filterMenu).on("click", "button", function (event) {
696                event.preventDefault();
697                $(this).addClass("active");
698                $(this).siblings(".active").removeClass("active");
699            });
700        }
701    });
702
703
704    // Active specifix
705    $('.filter-active-cat1').imagesLoaded(function () {
706        var $filter = '.filter-active-cat1',
707            $filterItem = '.filter-item',
708            $filterMenu = '.filter-menu-active';
709
710        if ($($filter).length > 0) {
711            var $grid = $($filter).isotope({
712                itemSelector: $filterItem,
713                filter: '.cat1',
714                masonry: {
715                    // use outer width of grid-sizer for columnWidth
716                    columnWidth: 1
717                }
718            });
719
720            // filter items on button click
721            $($filterMenu).on('click', 'button', function () {
722                var filterValue = $(this).attr('data-filter');
723                $grid.isotope({
724                    filter: filterValue
725                });
726            });
727
728            // Menu Active Class 
729            $($filterMenu).on('click', 'button', function (event) {
730                event.preventDefault();
731                $(this).addClass('active');
732                $(this).siblings('.active').removeClass('active');
733            });
734        };
735    });
736
737    $(".masonary-active").imagesLoaded(function () {
738        var $filter = ".masonary-active",
739            $filterItem = ".filter-item";
740
741        if ($($filter).length > 0) {
742            $($filter).isotope({
743                itemSelector: $filterItem,
744                filter: "*",
745                masonry: {
746                    // use outer width of grid-sizer for columnWidth
747                    columnWidth: 1,
748                },
749            });
750        }
751    });
752
753    $(".masonary-active, .woocommerce-Reviews .comment-list").imagesLoaded(function () {
754        var $filter = ".masonary-active, .woocommerce-Reviews .comment-list",
755            $filterItem = ".filter-item, .woocommerce-Reviews .comment-list li";
756
757        if ($($filter).length > 0) {
758            $($filter).isotope({
759                itemSelector: $filterItem,
760                filter: "*",
761                masonry: {
762                    // use outer width of grid-sizer for columnWidth
763                    columnWidth: 1,
764                },
765            });
766        }
767        $('[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
768            $($filter).isotope({
769                filter: "*",
770            });
771        });
772    });
773
774    /*----------- 15. Counter Up ----------*/
775    $(".counter-number").counterUp({
776        delay: 10,
777        time: 1000,
778    });
779
780    /*----------- 17. Shape Mockup ----------*/
781    $.fn.shapeMockup = function () {
782        var $shape = $(this);
783        $shape.each(function () {
784            var $currentShape = $(this),
785                shapeTop = $currentShape.data("top"),
786                shapeRight = $currentShape.data("right"),
787                shapeBottom = $currentShape.data("bottom"),
788                shapeLeft = $currentShape.data("left");
789            $currentShape
790                .css({
791                    top: shapeTop,
792                    right: shapeRight,
793                    bottom: shapeBottom,
794                    left: shapeLeft,
795                })
796                .removeAttr("data-top")
797                .removeAttr("data-right")
798                .removeAttr("data-bottom")
799                .removeAttr("data-left")
800                .parent()
801                .addClass("shape-mockup-wrap");
802        });
803    };
804
805    if ($(".shape-mockup")) {
806        $(".shape-mockup").shapeMockup();
807    }
808
809    /*----------- 18. Progress Bar Animation ----------*/
810    $('.progress-bar').waypoint(function () {
811        $('.progress-bar').css({
812            animation: "animate-positive 1.8s",
813            opacity: "1"
814        });
815    }, { offset: '75%' });
816
817    /*----------- 19. Price Slider ----------*/
818    $(".price_slider").slider({
819        range: true,
820        min: 10,
821        max: 100,
822        values: [10, 75],
823        slide: function (event, ui) {
824            $(".from").text("$" + ui.values[0]);
825            $(".to").text("$" + ui.values[1]);
826        }
827    });
828    $(".from").text("$" + $(".price_slider").slider("values", 0));
829    $(".to").text("$" + $(".price_slider").slider("values", 1));
830
831    /*----------- 20. Tilt Active ----------*/
832    $('.tilt-active').tilt({
833        maxTilt: 7,
834        perspective: 1000,
835    })
836
837    /*---------- 22. Circle Progress ----------*/
838    function animateElements() {
839        $('.feature-circle .progressbar').each(function () {
840            var pathColor = $(this).attr('data-path-color');
841            var elementPos = $(this).offset().top;
842            var topOfWindow = $(window).scrollTop();
843            var percent = $(this).find('.circle').attr('data-percent');
844            var percentage = parseInt(percent, 10) / parseInt(100, 10);
845            var animate = $(this).data('animate');
846            if (elementPos < topOfWindow + $(window).height() - 30 && !animate) {
847                $(this).data('animate', true);
848                $(this).find('.circle').circleProgress({
849                    startAngle: -Math.PI / 2,
850                    value: percent / 100,
851                    size: 100,
852                    thickness: 6,
853                    emptyFill: "transparent",
854                    lineCap: 'round',
855                    fill: {
856                        color: pathColor,
857                    }
858                }).on('circle-animation-progress', function (event, progress, stepValue) {
859                    $(this).find('.circle-num').text((stepValue * 100).toFixed(0) + "%");
860                }).stop();
861            }
862        });
863
864        $('.skill-circle .progressbar').each(function () {
865            var pathColor = $(this).attr('data-path-color');
866            var elementPos = $(this).offset().top;
867            var topOfWindow = $(window).scrollTop();
868            var percent = $(this).find('.circle').attr('data-percent');
869            var percentage = parseInt(percent, 10) / parseInt(100, 10);
870            var animate = $(this).data('animate');
871            if (elementPos < topOfWindow + $(window).height() - 30 && !animate) {
872                $(this).data('animate', true);
873                $(this).find('.circle').circleProgress({
874                    startAngle: -Math.PI / 2,
875                    value: percent / 100,
876                    size: 176,
877                    thickness: 8,
878                    emptyFill: "#EFF1F9",
879                    lineCap: 'round',
880                    fill: {
881                        color: pathColor,
882                    }
883                }).on('circle-animation-progress', function (event, progress, stepValue) {
884                    $(this).find('.circle-num').text((stepValue * 100).toFixed(0) + "%");
885                }).stop();
886            }
887        });
888    }
889
890    // Show animated elements
891    animateElements();
892    $(window).scroll(animateElements);
893
894    /*----------- 00. Woocommerce Toggle ----------*/
895    // Ship To Different Address
896    $("#ship-to-different-address-checkbox").on("change", function () {
897        if ($(this).is(":checked")) {
898            $("#ship-to-different-address")
899                .next(".shipping_address")
900                .slideDown();
901        } else {
902            $("#ship-to-different-address").next(".shipping_address").slideUp();
903        }
904    });
905
906    // Login Toggle
907    $(".woocommerce-form-login-toggle a").on("click", function (e) {
908        e.preventDefault();
909        $(".woocommerce-form-login").slideToggle();
910    });
911
912    // Coupon Toggle
913    $(".woocommerce-form-coupon-toggle a").on("click", function (e) {
914        e.preventDefault();
915        $(".woocommerce-form-coupon").slideToggle();
916    });
917
918    // Woocommerce Shipping Method
919    $(".shipping-calculator-button").on("click", function (e) {
920        e.preventDefault();
921        $(this).next(".shipping-calculator-form").slideToggle();
922    });
923
924    // Woocommerce Payment Toggle
925    $('.wc_payment_methods input[type="radio"]:checked')
926        .siblings(".payment_box")
927        .show();
928    $('.wc_payment_methods input[type="radio"]').each(function () {
929        $(this).on("change", function () {
930            $(".payment_box").slideUp();
931            $(this).siblings(".payment_box").slideDown();
932        });
933    });
934
935    // Woocommerce Rating Toggle
936    $(".rating-select .stars a").each(function () {
937        $(this).on("click", function (e) {
938            e.preventDefault();
939            $(this).siblings().removeClass("active");
940            $(this).parent().parent().addClass("selected");
941            $(this).addClass("active");
942        });
943    });
944
945    // Quantity Plus Minus ---------------------------
946
947    $(".quantity-plus").each(function () {
948        $(this).on("click", function (e) {
949            e.preventDefault();
950            var $qty = $(this).siblings(".qty-input");
951            var currentVal = parseInt($qty.val(), 10);
952            if (!isNaN(currentVal)) {
953                $qty.val(currentVal + 1);
954            }
955        });
956    });
957
958    $(".quantity-minus").each(function () {
959        $(this).on("click", function (e) {
960            e.preventDefault();
961            var $qty = $(this).siblings(".qty-input");
962            var currentVal = parseInt($qty.val(), 10);
963            if (!isNaN(currentVal) && currentVal > 1) {
964                $qty.val(currentVal - 1);
965            }
966        });
967    });
968
969    // /*----------- 00.Gsap Cursor ----------*/
970    var cursor = $(".cursor"),
971        follower = $(".cursor2");
972
973    var posX = 0,
974        posY = 0;
975
976    var mouseX = 0,
977        mouseY = 0;
978
979    TweenMax.to({}, 0.016, {
980        repeat: -1,
981        onRepeat: function () {
982            posX += (mouseX - posX) / 9;
983            posY += (mouseY - posY) / 9;
984
985            TweenMax.set(follower, {
986                css: {
987                    left: posX - 12,
988                    top: posY - 12
989                }
990            });
991
992            TweenMax.set(cursor, {
993                css: {
994                    left: mouseX,
995                    top: mouseY
996                }
997            });
998        }
999    });
1000
1001    $(document).on("mousemove", function (e) {
1002        mouseX = e.clientX;
1003        mouseY = e.clientY;
1004    });
1005    //circle
1006    $(".btn").on("mouseenter", function () {
1007        cursor.addClass("active");
1008        follower.addClass("active");
1009    });
1010    $(".btn").on("mouseleave", function () {
1011        cursor.removeClass("active");
1012        follower.removeClass("active");
1013    });
1014    // CURSOR End
1015
1016    // /*----------- 00.GSAP Register ----------*/
1017    window.gsap.registerPlugin(
1018        window.TweenMax
1019    );
1020
1021    // /*----------- 00.Color Scheme ----------*/
1022    $('.color-switch-btns button').each(function () {
1023        // Get color for button
1024        const button = $(this);
1025        const color = button.data('color');
1026        button.css('--theme-color', color);
1027
1028        // Change theme color on click
1029        button.on('click', function () {
1030            const clickedColor = $(this).data('color');
1031            $('body').css('--theme-color', clickedColor);
1032        });
1033    });
1034
1035    $(document).on('click', '.switchIcon', function () {
1036        $('.color-scheme-wrap').toggleClass('active');
1037    });
1038
1039    // /*----------- Pricing-switch & Tab ----------*/
1040    var e = document.getElementById("filt-monthly"),
1041        d = document.getElementById("filt-yearly"),
1042        t = document.getElementById("switcher"),
1043        m = document.getElementById("monthly"),
1044        y = document.getElementById("yearly");
1045
1046
1047    if ($('.pricing-tabs').length) {
1048        e.addEventListener("click", function () {
1049            t.checked = false;
1050            e.classList.add("toggler--is-active");
1051            d.classList.remove("toggler--is-active");
1052            m.classList.remove("hide");
1053            y.classList.add("hide");
1054        });
1055
1056        d.addEventListener("click", function () {
1057            t.checked = true;
1058            d.classList.add("toggler--is-active");
1059            e.classList.remove("toggler--is-active");
1060            m.classList.add("hide");
1061            y.classList.remove("hide");
1062        });
1063
1064        t.addEventListener("click", function () {
1065            d.classList.toggle("toggler--is-active");
1066            e.classList.toggle("toggler--is-active");
1067            m.classList.toggle("hide");
1068            y.classList.toggle("hide");
1069        });
1070    }
1071
1072
1073    // /*----------- 00. Right Click Disable ----------*/
1074    //   window.addEventListener('contextmenu', function (e) {
1075    //     // do something here... 
1076    //     e.preventDefault();  
1077    //   }, false); 
1078
1079    // /*----------- 00. Inspect Element Disable ----------*/
1080    //   document.onkeydown = function (e) {
1081    //     if (event.keyCode == 123) {
1082    //       return false;
1083    //     }
1084    //     if (e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
1085    //       return false;
1086    //     }
1087    //     if (e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
1088    //       return false;
1089    //     }
1090    //     if (e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
1091    //       return false;
1092    //     }
1093    //     if (e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
1094    //       return false;
1095    //     }
1096    //   }
1097
1098})(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.