PageSourceSearch

https://tigalab.id/wp-content/themes/frutin/assets/js/main.js?ver=1.0

js tigalab.id collected 2026-10-06 13:17:23 UTC 29,835 bytes, 851 lines download raw bytes

1function frutin_content_load_scripts() {
2    var $ = jQuery;
3    "use strict";
4
5    /*---------- 03. Mobile Menu Active ----------*/
6    $.fn.thmobilemenu = function (options) {
7        var opt = $.extend(
8            {
9                menuToggleBtn: ".th-menu-toggle",
10                bodyToggleClass: "th-body-visible",
11                subMenuClass: "th-submenu",
12                subMenuParent: "th-item-has-children",
13                subMenuParentToggle: "th-active",
14                meanExpandClass: "th-mean-expand",
15                appendElement: '<span class="th-mean-expand"></span>',
16                subMenuToggleClass: "th-open",
17                toggleSpeed: 400,
18            },
19            options
20        );
21
22        return this.each(function () {
23            var menu = $(this); // Select menu
24
25            // Menu Show & Hide
26            function menuToggle() {
27                menu.toggleClass(opt.bodyToggleClass);
28
29                // collapse submenu on menu hide or show
30                var subMenu = "." + opt.subMenuClass;
31                $(subMenu).each(function () {
32                    if ($(this).hasClass(opt.subMenuToggleClass)) {
33                        $(this).removeClass(opt.subMenuToggleClass);
34                        $(this).css("display", "none");
35                        $(this).parent().removeClass(opt.subMenuParentToggle);
36                    }
37                });
38            }
39
40            // Class Set Up for every submenu
41            menu.find("li").each(function () {
42                var submenu = $(this).find("ul");
43                submenu.addClass(opt.subMenuClass);
44                submenu.css("display", "none");
45                submenu.parent().addClass(opt.subMenuParent);
46                submenu.prev("a").append(opt.appendElement);
47                submenu.next("a").append(opt.appendElement);
48            });
49
50            // Toggle Submenu
51            function toggleDropDown($element) {
52                if ($($element).next("ul").length > 0) {
53                    $($element).parent().toggleClass(opt.subMenuParentToggle);
54                    $($element).next("ul").slideToggle(opt.toggleSpeed);
55                    $($element).next("ul").toggleClass(opt.subMenuToggleClass);
56                } else if ($($element).prev("ul").length > 0) {
57                    $($element).parent().toggleClass(opt.subMenuParentToggle);
58                    $($element).prev("ul").slideToggle(opt.toggleSpeed);
59                    $($element).prev("ul").toggleClass(opt.subMenuToggleClass);
60                }
61            }
62
63            // Submenu toggle Button
64            var expandToggler = "." + opt.meanExpandClass;
65            $(expandToggler).each(function () {
66                $(this).on("click", function (e) {
67                    e.preventDefault();
68                    toggleDropDown($(this).parent());
69                });
70            });
71
72            // Menu Show & Hide On Toggle Btn click
73            $(opt.menuToggleBtn).each(function () {
74                $(this).on("click", function () {
75                    menuToggle();
76                });
77            });
78
79            // Hide Menu On out side click
80            menu.on("click", function (e) {
81                e.stopPropagation();
82                menuToggle();
83            });
84
85            // Stop Hide full menu on menu click
86            menu.find("div").on("click", function (e) {
87                e.stopPropagation();
88            });
89        });
90    };
91
92    $(".th-menu-wrapper").thmobilemenu();
93
94    /*---------- 04. Sticky fix ----------*/
95    $(window).scroll(function () {
96        var topPos = $(this).scrollTop();
97        if (topPos > 500) {
98            $('.sticky-wrapper').addClass('sticky');
99            $('.category-menu').addClass('close-category');
100        } else {
101            $('.sticky-wrapper').removeClass('sticky')
102            $('.category-menu').removeClass('close-category');
103        }
104    })
105
106    $(".menu-expand").each(function () {
107        $(this).on("click", function (e) {
108            e.preventDefault();
109            $('.category-menu').toggleClass('open-category');
110        });
111    });
112
113    /*---------- 05. Scroll To Top ----------*/
114    // progressAvtivation
115    if ($('.scroll-top').length > 0) {
116        
117        var scrollTopbtn = document.querySelector('.scroll-top');
118        var progressPath = document.querySelector('.scroll-top path');
119        var pathLength = progressPath.getTotalLength();
120        progressPath.style.transition = progressPath.style.WebkitTransition = '
120none';
121        progressPath.style.strokeDasharray = pathLength + ' ' + pathLength;
122        progressPath.style.strokeDashoffset = pathLength;
123        progressPath.getBoundingClientRect();
124        progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear';		
125        var updateProgress = function () {
126            var scroll = $(window).scrollTop();
127            var height = $(document).height() - $(window).height();
128            var progress = pathLength - (scroll * pathLength / height);
129            progressPath.style.strokeDashoffset = progress;
130        }
131        updateProgress();
132        $(window).scroll(updateProgress);	
133        var offset = 50;
134        var duration = 750;
135        jQuery(window).on('scroll', function() {
136            if (jQuery(this).scrollTop() > offset) {
137                jQuery(scrollTopbtn).addClass('show');
138            } else {
139                jQuery(scrollTopbtn).removeClass('show');
140            }
141        });				
142        jQuery(scrollTopbtn).on('click', function(event) {
143            event.preventDefault();
144            jQuery('html, body').animate({scrollTop: 0}, duration);
145            return false;
146        })
147    }
148
149    /*---------- 06. Set Background Image Color & Mask ----------*/
150    if ($("[data-bg-src]").length > 0) {
151        $("[data-bg-src]").each(function () {
152            var src = $(this).attr("data-bg-src");
153            $(this).css("background-image", "url(" + src + ")");
154            $(this).removeAttr("data-bg-src").addClass("background-image");
155        });
156    }
157
158    if ($('[data-bg-color]').length > 0) {
159        $('[data-bg-color]').each(function () {
160          var color = $(this).attr('data-bg-color');
161          $(this).css('background-color', color);
162          $(this).removeAttr('data-bg-color');
163        });
164    };
165
166    $('[data-border]').each(function() {
167        var borderColor = $(this).data('border');
168        $(this).css('--th-border-color', borderColor);
169    });
170      
171    if ($('[data-mask-src]').length > 0) {
172        $('[data-mask-src]').each(function () {
173          var mask = $(this).attr('data-mask-src');
174          $(this).css({
175            'mask-image': 'url(' + mask + ')',
176            '-webkit-mask-image': 'url(' + mask + ')'
177          });
178          $(this).addClass('bg-mask');
179          $(this).removeAttr('data-mask-src');
180        });
181    };
182    
183    
184
185    /*----------- 07. Global Slider ---------------------------------------------------------*/
186    $('.th-slider').each(function () {
187
188        var thSlider = $(this);
189        var settings = $(this).data('slider-options');
190
191        // Store references to the navigation Slider
192        var prevArrow = thSlider.find('.slider-prev');
193        var nextArrow = thSlider.find('.slider-next');
194        var paginationEl = thSlider.find('.slider-pagination');
195
196        var paginationType = settings['paginationType'] ? settings['paginationType'] : 'bullets';
197
198        var autoplayconditon = settings['autoplay'];
199
200        var sliderDefault = {
201            slidesPerView: 1,
202            spaceBetween: settings['spaceBetween'] ? settings['spaceBetween'] : 24,
203            loop: settings['loop'] == false ? false : true,
204            speed: settings['speed'] ? settings['speed'] : 1000,
205            autoplay: autoplayconditon ? autoplayconditon : {delay: 6000, disableOnInteraction: false},
206            navigation: {
207                nextEl: nextArrow.get(0),
208                prevEl: prevArrow.get(0),  
209            },
210            pagination: {
211                el: paginationEl.get(0),
212                type: paginationType,
213                clickable: true, 
214                renderBullet: function (index, className) {
215                    return '<span class="' + className + '" aria-label="Go to Slide ' + (index + 1) + '"></span>';
216                },
217                formatFractionCurrent: function (number) {
218                    return ('0' + number).slice(-2);
219                },
220                formatFractionTotal: function (number) {
221                    return ('0' + number).slice(-2);
222                },
223                renderFraction: function (currentClass, totalClass) {
224                    return '<span class="' + currentClass + '"></span>' +
225                           ' / ' +
226                           '<span class="' + totalClass + '"></span>';
227                }
228            },
229            on: {
230                slideChange: function() {
231                    setTimeout(function () {
232                        swiper.params.mousewheel.releaseOnEdges = false;
233                    }, 500);
234                },
235                reachEnd: function() {
236                    setTimeout(function () {
237                        swiper.params.mousewheel.releaseOnEdges = true;
238                    }, 750);
239                }
240            }
241        };
242
243        var options = JSON.parse(thSlider.attr('data-slider-options'));
244        options = $.extend({}, sliderDefault, options);
245        var swiper = new Swiper(thSlider.get(0), options); // Assign the swiper variable
246
247        if ($('.slider-area').length > 0) {
248            $('.slider-area').closest(".container").parent().addClass("arrow-wrap");
249        }
250
251    });
252
253    // Function to add animation classes
254    function animationProperties() {
255        $('[data-ani]').each(function () {
256            var animationName = $(this).data('ani');
257            $(this).addClass(animationName);
258        });
259
260        $('[data-ani-delay]').each(function () {
261            var delayTime = $(this).data('ani-delay');
262            $(this).css('animation-delay', delayTime);
263        });
264    }
265    animationProperties();
266    
267
268    // Add click event handlers for external slider arrows based on data attributes
269    $('[data-slider-prev], [data-slider-next]').on('click', function () {
270        var sliderSelector = $(this).data('slider-prev') || $(this).data('slider-next');
271        var targetSlider = $(sliderSelector);
272
273        if (targetSlider.length) {
274            var swiper = targetSlider[0].swiper;
275
276            if (swiper) {
277                if ($(this).data('slider-prev')) {
278                    swiper.slidePrev(); 
279                } else {
280                    swiper.slideNext(); 
281                }
282            }
283        }
284    });
285
286    /* Slider End Here ------------------------------------------------------------------------*/
287
288    /*---------- 10. Search Box Popup ----------*/
289    function popupSarchBox($searchBox, $searchOpen, $searchCls, $toggleCls) {
290        $($searchOpen).on("click", function (e) {
291            e.preventDefault();
292            $($searchBox).addClass($toggleCls);
293        });
294        $($searchBox).on("click", function (e) {
295            e.stopPropagation();
296            $($searchBox).removeClass($toggleCls);
297        });
298        $($searchBox)
299            .find("form")
300            .on("click", function (e) {
301                e.stopPropagation();
302                $($searchBox).addClass($toggleCls);
303            });
304        $($searchCls).on("click", function (e) {
305            e.preventDefault();
306            e.stopPropagation();
307            $($searchBox).removeClass($toggleCls);
308        });
309    }
310    popupSarchBox( ".popup-search-box", ".searchBoxToggler", ".searchClose", "show" );
311
312    /*---------- 11. Popup Sidemenu ----------*/
313    function popupSideMenu($sideMenu, $sideMunuOpen, $sideMenuCls, $toggleCls) {
314        // Sidebar Popup
315        $($sideMunuOpen).on('click', function (e) {
316        e.preventDefault();
317        $($sideMenu).addClass($toggleCls);
318        });
319        $($sideMenu).on('click', function (e) {
320        e.stopPropagation();
321        $($sideMenu).removeClass($toggleCls)
322        });
323        var sideMenuChild = $sideMenu + ' > div';
324        $(sideMenuChild).on('click', function (e) {
325        e.stopPropagation();
326        $($sideMenu).addClass($toggleCls)
327        });
328        $($sideMenuCls).on('click', function (e) {
329        e.preventDefault();
330        e.stopPropagation();
331        $($sideMenu).removeClass($toggleCls);
332        });
333    };
334    popupSideMenu('.sidemenu-info', '.sideMenuInfo', '.sideMenuCls', 'show');
335    popupSideMenu('.sidemenu-cart', '.sideMenuCart', '.sideMenuCls', 'show');
336
337    /*----------- 14. Search Masonary ----------*/
338    $(".filter-active").imagesLoaded(function () {
339        var $filter = ".filter-active",
340            $filterItem = ".filter-item",
341            $filterMenu = ".filter-menu-active";
342
343        if ($($filter).length > 0) {
344            var $grid = $($filter).isotope({
345                itemSelector: $filterItem,
346                filter: "*",
347                percentPosition: true,
348                masonry: {
349                    columnWidth: $filterItem,
350                },
351            });
352
353            // filter items on button click
354            $($filterMenu).on("click", "button", function () {
355                var filterValue = $(this).attr("data-filter");
356                $grid.isotope({
357                    filter: filterValue,
358                });
359            });
360
361            // Menu Active Class
362            $($filterMenu).on("click", "button", function (event) {
363                event.preventDefault();
364                $(this).addClass("active");
365                $(this).siblings(".active").removeClass("active");
366            });
367        }
368    });
369
370    $('.search-active').imagesLoaded(function () {
371        var $filter = '.search-active', 
372        $filterItem = '.filter-item';
373
374        if ($($filter).length > 0) {
375        var $grid = $($filter).isotope({
376            itemSelector: $filterItem,
377            filter: '*',
378            // masonry: {
379            // // use outer width of grid-sizer for columnWidth
380            //     columnWidth: 1
381            // }
382        });
383        };
384    });
385
386    $(".masonary-active, .woocommerce-Reviews .comment-list").imagesLoaded(function () {
387        var $filter = ".masonary-active, .woocommerce-Reviews .comment-list",
388            $filterItem = ".filter-item, .woocommerce-Reviews .comment-list li";
389
390        if ($($filter).length > 0) {
391            $($filter).isotope({
392                itemSelector: $filterItem,
393                filter: "*",
394                masonry: {
395                    // use outer width of grid-sizer for columnWidth
396                    columnWidth: 1,
397                },
398            });
399        }
400        $('[data-bs-toggle="tab"]').on('shown.bs.tab', function (e) {
401            $($filter).isotope({
402                filter: "*",
403            });
404        });
405    });
406
407    /*----------- 14. Counter Up ----------*/
408    $(".counter-number").counterUp({
409        delay: 10,
410        time: 1000,
411    });
412
413    $.fn.shapeMockup = function () {
414        var $shape = $(this);
415        $shape.each(function() {
416          var $currentShape = $(this),
417          shapeTop = $currentShape.data('top'),
418          shapeRight = $currentShape.data('right'),
419          shapeBottom = $currentShape.data('bottom'),
420          shapeLeft = $currentShape.data('left');
421          $currentShape.css({
422            top: shapeTop,
423            right: shapeRight,
424            bottom: shapeBottom,
425            left: shapeLeft,
426          }).removeAttr('data-top')
427          .removeAttr('data-right')
428          .removeAttr('data-bottom')
429          .removeAttr('data-left')
430          .closest('.elementor-widget').css('position', 'static')
431          .closest('.e-parent').addClass('shape-mockup-wrap');
432        });
433    };
434
435    if ($('.shape-mockup')) {
436        $('.shape-mockup').shapeMockup();
437    }
438
439    /*----------- 12. Magnific Popup ----------*/
440    /* magnificPopup img view */
441    $(".popup-image").magnificPopup({
442        type: "image",
443        mainClass: 'mfp-zoom-in', 
444        removalDelay: 260,
445        gallery: {
446            enabled: true,
447        },
448    });
449
450    /* magnificPopup video view */
451    $(".popup-video").magnificPopup({
452        type: "iframe",
453    });
454
455    /* magnificPopup video view */
456    $(".popup-content").magnificPopup({
457        type: "inline",
458        midClick: true,
459    });
460
461    $(".popup-content").on("click", function () {
462        $(".slick-slider").slick("refresh");
463    });
464
465    /*---------- 15. Image Zoom ----------*/ 
466    function magnify(imgSelector, zoom) {
467        $(imgSelector).each(function () {
468          var img = $(this);
469          var glass, w, h, bw;
470      
471          /* Create magnifier glass: */
472          glass = $("<div class='img-magnifier-glass'></div>");
473      
474          /* Insert magnifier glass: */
475          img.parent().prepend(glass);
476      
477          /* Set background properties for the magnifier glass: */
478          glass.css({
479            backgroundImage: "url('" + img.attr("src") + "')",
480            backgroundRepeat: "no-repeat",
481            backgroundSize: img.width() * zoom + "px " + img.height() * zoom + "px",
482          });
483      
484          bw = 3;
485          w = glass.width() / 2;
486          h = glass.height() / 2;
487      
488          /* Execute a function when someone moves the magnifier glass over the image: */
489          glass.on("mousemove", moveMagnifier);
490          img.on("mousemove", moveMagnifier);
491      
492          /* and also for touch screens: */
493          glass.on("touchmove", moveMagnifier);
494          img.on("touchmove", moveMagnifier);
495      
496          function moveMagnifier(e) {
497            var pos, x, y;
498            /* Prevent any other actions that may occur when moving over the image */
499            e.preventDefault();
500            /* Get the cursor's x and y positions: */
501            pos = getCursorPos(e);
502            x = pos.x;
503            y = pos.y;
504            /* Prevent the magnifier glass from being positioned outside the image: */
505            if (x > img.width() - (w / zoom)) {
506              x = img.width() - (w / zoom);
507            }
508            if (x < w / zoom) {
509              x = w / zoom;
510            }
511            if (y > img.height() - (h / zoom)) {
512              y = img.height() - (h / zoom);
513            }
514            if (y < h / zoom) {
515              y = h / zoom;
516            }
517            /* Set the position of the magnifier glass: */
518            glass.css({
519              left: (x - w) + "px",
520              top: (y - h) + "px",
521              backgroundPosition: "-" + ((x * zoom) - w + bw) + "px -" + ((y * zoom) - h + bw) + "px",
522            });
523          }
524      
525          function getCursorPos(e) {
526            var a, x = 0, y = 0;
527            e = e || window.event;
528            /* Get the x and y positions of the image: */
529            a = img[0].getBoundingClientRect();
530            /* Calculate the cursor's x and y coordinates, relative to the image: */
531            x = e.pageX - a.left;
532            y = e.pageY - a.top;
533            /* Consider any page scrolling: */
534            x = x - window.pageXOffset;
535            y = y - window.pageYOffset;
536            return { x: x, y: y };
537          }
538        });
539    }
540      
541    magnify(".magnified img", 2);
542    
543      
544    
545    /*---------- 14. Section Position ----------*/ 
546    // Interger Converter
547    function convertInteger(str) {
548        return parseInt(str, 10);
549    }
550
551    $.fn.sectionPosition = function (mainAttr, posAttr) {
552        $(this).each(function () {
553            var section = $(this);
554
555            function setPosition() {
556                var sectionHeight = Math.floor(section.height() / 2), // Main Height of section
557                    posData = section.attr(mainAttr), // where to position
558                    posFor = section.attr(posAttr), // On Which section is for positioning
559                    topMark = "top-half", // Pos top
560                    bottomMark = "bottom-half", // Pos Bottom
561                    parentPT = convertInteger($(posFor).css("padding-top")), // Default Padding of  parent
562                    parentPB = convertInteger($(posFor).css("padding-bottom")); // Default Padding of  parent
563
564                if (posData === topMark) {
565                    $(posFor).css(
566                        "padding-bottom",
567                        parentPB + sectionHeight + "px"
568                    );
569                    section.css("margin-top", "-" + sectionHeight + "px");
570                } else if (posData === bottomMark) {
571                    $(posFor).css(
572                        "padding-top",
573                        parentPT + sectionHeight + "px"
574                    );
575                    section.css("margin-bottom", "-" + sectionHeight + "px");
576                }
577            }
578            setPosition(); // Set Padding On Load
579        });
580    };
581
582    var postionHandler = "[data-sec-pos]";
583    if ($(postionHandler).length) {
584        $(postionHandler).imagesLoaded(function () {
585            $(postionHandler).sectionPosition("data-sec-pos", "data-pos-for");
586        });
587    }
588
589    /*----------- 16. Progress Bar Animation ----------*/
590    $('.progress-bar').waypoint(function() {
591        $('.progress-bar').css({
592        animation: "animate-positive 1.8s",
593        opacity: "1"
594        });
595    }, { offset: '75%' });
596
597    /*----------- 19. Countdown ----------*/
598
599    $.fn.countdown = function () {
600        $(this).each(function () {
601            var $counter = $(this),
602                countDownDate = new Date($counter.data("offer-date")).getTime(), // Set the date we're counting down toz
603                exprireCls = "expired";
604
605            // Finding Function
606            function s$(element) {
607                return $counter.find(element);
608            }
609
610            // Update the count down every 1 second
611            var counter = setInterval(function () {
612                // Get today's date and time
613                var now = new Date().getTime();
614
615                // Find the distance between now and the count down date
616                var distance = countDownDate - now;
617
618                // Time calculations for days, hours, minutes and seconds
619                var days = Math.floor(distance / (1000 * 60 * 60 * 24));
620                var hours = Math.floor(
621                    (distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
622                );
623                var minutes = Math.floor(
624                    (distance % (1000 * 60 * 60)) / (1000 * 60)
625                );
626                var seconds = Math.floor((distance % (1000 * 60)) / 1000);
627
628                // Check If value is lower than ten, so add zero before number
629                days < 10 ? (days = "0" + days) : null;
630                hours < 10 ? (hours = "0" + hours) : null;
631                minutes < 10 ? (minutes = "0" + minutes) : null;
632                seconds < 10 ? (seconds = "0" + seconds) : null;
633
634                // If the count down is over, write some text
635                if (distance < 0) {
636                    clearInterval(counter);
637                    $counter.addClass(exprireCls);
638                    $counter.find(".message").css("display", "block");
639                } else {
640                    // Output the result in elements
641                    s$(".day").html(days);
642                    s$(".hour").html(hours);
643                    s$(".minute").html(minutes);
644                    s$(".seconds").html(seconds);
645                }
646            }, 1000);
647        });
648    };
649
650    if ($(".counter-list").length) {
651        $(".counter-list").countdown();
652    }
653
654    /*---------- 14. Image to SVG Code ----------*/
655    const cache = {};
656
657    $.fn.inlineSvg = function fnInlineSvg() {
658        this.each(imgToSvg);
659
660        return this;
661    };
662
663    function imgToSvg() {
664        const $img = $(this);
665        const src = $img.attr("src");
666
667        // fill cache by src with promise
668        if (!cache[src]) {
669            const d = $.Deferred();
670            $.get(src, (data) => {
671                d.resolve($(data).find("svg"));
672            });
673            cache[src] = d.promise();
674        }
675
676        // replace img with svg when cached promise resolves
677        cache[src].then((svg) => {
678            const $svg = $(svg).clone();
679
680            if ($img.attr("id")) $svg.attr("id", $img.attr("id"));
681            if ($img.attr("class")) $svg.attr("class", $img.attr("class"));
682            if ($img.attr("style")) $svg.attr("style", $img.attr("style"));
683
684            if ($img.attr("width")) {
685                $svg.attr("width", $img.attr("width"));
686                if (!$img.attr("height")) $svg.removeAttr("height");
687            }
688            if ($img.attr("height")) {
689                $svg.attr("height", $img.attr("height"));
690                if (!$img.attr("width")) $svg.removeAttr("width");
691            }
692
693            $svg.insertAfter($img);
694            $img.trigger("svgInlined", $svg[0]);
695            $img.remove();
696        });
697    }
698
699    $(".svg-img").inlineSvg();
700
701
702    /*----------- 21. Price Slider ----------*/
703    $(".price_slider").slider({
704        range: true,
705        min: 10,
706        max: 100,
707        values: [10, 75],
708        slide: function (event, ui) {
709            $(".from").text("$" + ui.values[0]);
710            $(".to").text("$" + ui.values[1]);
711        }
712    });
713    $(".from").text("$" + $(".price_slider").slider("values", 0));
714    $(".to").text("$" + $(".price_slider").slider("values", 1));
715
716    /*----------- 00. Woocommerce Toggle ----------*/
717    // Ship To Different Address
718    $("#ship-to-different-address-checkbox").on("change", function () {
719        if ($(this).is(":checked")) {
720            $("#ship-to-different-address")
721                .next(".shipping_address")
722                .slideDown();
723        } else {
724            $("#ship-to-different-address").next(".shipping_address").slide
724Up();
725        }
726    });
727
728    // Woocommerce Payment Toggle
729    $('.wc_payment_methods input[type="radio"]:checked')
730        .siblings(".payment_box")
731        .show();
732    $('.wc_payment_methods input[type="radio"]').each(function () {
733        $(this).on("change", function () {
734            $(".payment_box").slideUp();
735            $(this).siblings(".payment_box").slideDown();
736        });
737    });
738
739    // Woocommerce Rating Toggle
740    $(".rating-select .stars a").each(function () {
741        $(this).on("click", function (e) {
742            e.preventDefault();
743            $(this).siblings().removeClass("active");
744            $(this).parent().parent().addClass("selected");
745            $(this).addClass("active");
746        });
747    });
748
749    // Quantity Plus Minus ---------------------------
750    /*---------- Quantity Added ----------*/
751    $(document).on('click', '.quantity-plus, .quantity-minus', function(e) {
752        e.preventDefault();
753        // Get current quantity values
754        var qty = $(this).closest('.quantity, .product-quantity').find('.qty-input');
755        var val = parseFloat(qty.val());
756        var max = parseFloat(qty.attr('max'));
757        var min = parseFloat(qty.attr('min'));
758        var step = parseFloat(qty.attr('step'));
759
760        // Change the value if plus or minus
761        if ($(this).is('.quantity-plus')) {
762            if (max && (max <= val)) {
763                qty.val(max);
764            } else {
765                qty.val(val + step);
766            }
767        } else {
768            if (min && (min >= val)) {
769                qty.val(min);
770            } else if (val > 0) {
771                qty.val(val - step);
772            }
773        }
774        $('.cart_table button[name="update_cart"]').prop('disabled', false);
775    });
776
777}
778
779(function ($) {
780
781    /*---------- 01. On Load Function ----------*/
782    $(window).on("load", function () {
783        $(".preloader").fadeOut();
784    });
785
786    /*---------- 02. Preloader ----------*/
787    if ($(".preloader").length > 0) {
788        $(".preloaderCls").each(function () {
789            $(this).on("click", function (e) {
790                e.preventDefault();
791                $(".preloader").css("display", "none");
792            });
793        });
794    }
795
796    /*---------- Sticky Footer ----------*/
797    function checkHeight() {
798        if ($('body').height() < $(window).height()) {
799          $('.footer-sitcky').addClass('sticky-footer');
800        } else {
801          $('.footer-sitcky').removeClass('sticky-footer');
802        }
803    }
804    $(window).on('load resize', function () {
805        checkHeight();
806    });
807
808    
809    // Elementor Frontend Load
810    $(window).on('elementor/frontend/init', function () {
811        if (elementorFrontend.isEditMode()) {
812            elementorFrontend.hooks.addAction('frontend/element_ready/global', function () {
813                setTimeout(function () {
814                    frutin_content_load_scripts();
815                }, 500);
816            });
817        }
818    });
819
820    // Window Load
821    $(window).on('load', function () {
822        frutin_content_load_scripts();
823    });
824
825
826    /*----------- 00. Right Click Disable ----------*/ 
827    //   window.addEventListener('contextmenu', function (e) {  
828    //     // do something here...
829    //     e.preventDefault(); 
830    //   }, false); 
831    /*----------- 00. Inspect Element Disable ----------*/
832    //   document.onkeydown = function (e) {   
833    //     if (event.keyCode == 123) {
834    //       return false;
835    //     }
836    //     if (e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
837    //       return false;
838    //     }
839    //     if (e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
840    //       return false;
841    //     }
842    //     if (e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
843    //       return false;
844    //     }
845    //     if (e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
846    //       return false;
847    //     }
848    //   } 
849
850    
851})(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.