PageSourceSearch

https://www.hkbs.org.hk/themes/hkbs/static/js/script.js

js hkbs.org.hk collected 2026-10-01 12:13:03 UTC 29,236 bytes, 1,059 lines download raw bytes

1(function($) {
2
3    "use strict";
4
5
6
7
8    if ($(".preloader-close").length) {
9        $(".preloader-close").on("click", function() {
10            $('.loader-wrap').delay(200).fadeOut(500);
11        })
12    }
13
14
15
16    //Update Header Style and Scroll to Top
17    function headerStyle() {
18        if ($('.main-header').length) {
19            var windowpos = $(window).scrollTop();
20            var siteHeader = $('.main-header');
21            var scrollLink = $('.scroll-to-top');
22
23            var HeaderHight = $('.main-header').height();
24            if (windowpos >= HeaderHight) {
25                siteHeader.addClass('fixed-header');
26                scrollLink.fadeIn(300);
27            } else {
28                siteHeader.removeClass('fixed-header');
29                scrollLink.fadeOut(300);
30            }
31
32        }
33    }
34
35    headerStyle();
36
37
38
39    //Submenu Dropdown Toggle
40    if ($('.main-header li.dropdown ul').length) {
41        $('.main-header li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>');
42
43        //Dropdown Button
44        $('.main-header li.dropdown .dropdown-btn').on('click', function() {
45            $(this).prev('ul').slideToggle(500);
46        });
47
48        //Dropdown Menu / Fullscreen Nav
49        $('.fullscreen-menu .navigation li.dropdown > a').on('click', function() {
50            $(this).next('ul').slideToggle(500);
51        });
52
53        //Disable dropdown parent link
54        $('.navigation li.dropdown > a').on('click', function(e) {
55            e.preventDefault();
56        });
57
58        //Disable dropdown parent link
59        $('.main-header .navigation li.dropdown > a,.hidden-bar .side-menu li.dropdown > a').on('click', function(e) {
60            e.preventDefault();
61        });
62
63        $('.cart-box .dropdown-menu').click(function(e) {
64            e.stopPropagation();
65        });
66
67    }
68
69
70    // Add Current Class Auto
71    function dynamicCurrentMenuClass(selector) {
72        let FileName = window.location.href.split("/").reverse()[0];
73
74        selector.find("li").each(function() {
75            let anchor = $(this).find("a");
76            if ($(anchor).attr("href") == FileName) {
77                $(this).addClass("current");
78            }
79        });
80        // if any li has .current elmnt add class
81        selector.children("li").each(function() {
82            if ($(this).find(".current").length) {
83                $(this).addClass("current");
84            }
85        });
86        // if no file name return
87        if ("" == FileName) {
88            selector.find("li").eq(0).addClass("current");
89        }
90    }
91
92    if ($('.main-header .header-lower .main-menu .navigation').length) {
93        dynamicCurrentMenuClass($('.main-header .header-lower .main-menu .navigation'));
94    }
95
96
97
98    //Mobile Nav Hide Show
99    if ($('.mobile-menu').length) {
100
101        $('.mobile-menu .menu-box').mCustomScrollbar();
102
103        var mobileMenuContent = $('.main-header .nav-outer .main-menu').html();
104        $('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent);
105        $('.sticky-header .main-menu').append(mobileMenuContent);
106
107        //Hide / Show Submenu
108        $('.mobile-menu .navigation > li.dropdown > .dropdown-btn').on('click', function(e) {
109            e.preventDefault();
110            var target = $(this).parent('li').children('ul');
111
112            if ($(target).is(':visible')) {
113                $(this).parent('li').removeClass('open');
114                $(target).slideUp(500);
115                $(this).parents('.navigation').children('li.dropdown').removeClass('open');
116                $(this).parents('.navigation').children('li.dropdown > ul').slideUp(500);
117                return false;
118            } else {
119                $(this).parents('.navigation').children('li.dropdown').removeClass('open');
120                $(this).parents('.navigation').children('li.dropdown').children('ul').slideUp(500);
121                $(this).parent('li').toggleClass('open');
122                $(this).parent('li').children('ul').slideToggle(500);
123            }
124        });
125
126        //3rd Level Nav
127        $('.mobile-menu .navigation > li.dropdown > ul  > li.dropdown > .dropdown-btn').on('click', function(e) {
128            e.preventDefault();
129            var targetInner = $(this).parent('li').children('ul');
130
131            if ($(targetInner).is(':visible')) {
132                $(this).parent('li').removeClass('open');
133                $(targetInner).slideUp(500);
134                $(this).parents('.navigation > ul').find('li.dropdown').removeClass('open');
135                $(this).parents('.navigation > ul').find('li.dropdown > ul').slideUp(500);
136                return false;
137            } else {
138                $(this).parents('.navigation > ul').find('li.dropdown').removeClass('open');
139                $(this).parents('.navigation > ul').find('li.dropdown > ul').slideUp(500);
140                $(this).parent('li').toggleClass('open');
141                $(this).parent('li').children('ul').slideToggle(500);
142            }
143        });
144
145        //Menu Toggle Btn
146        $('.mobile-nav-toggler').on('click', function() {
147            $('body').addClass('mobile-menu-visible');
148
149        });
150
151        //Menu Toggle Btn
152        $('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function() {
153            $('body').removeClass('mobile-menu-visible');
154            $('.mobile-menu .navigation > li').removeClass('open');
155            $('.mobile-menu .navigation li ul').slideUp(0);
156        });
157
158        $(document).keydown(function(e) {
159            if (e.keyCode == 27) {
160                $('body').removeClass('mobile-menu-visible');
161                $('.mobile-menu .navigation > li').removeClass('open');
162                $('.mobile-menu .navigation li ul').slideUp(0);
163            }
164        });
165
166    }
167
168
169
170
171
172    //Hidden Sidebar
173    if ($('.hidden-bar,.fullscreen-menu').length) {
174        var hiddenBar = $('.hidden-bar');
175        var hiddenBarOpener = $('.nav-toggler');
176        var hiddenBarCloser = $('.hidden-bar-closer,.close-menu');
177        $('.hidden-bar-wrapper').mCustomScrollbar();
178
179        //Show Sidebar
180        hiddenBarOpener.on('click', function() {
181            $('body').addClass('visible-menu-bar');
182            hiddenBar.addClass('visible-sidebar');
183        });
184
185        //Hide Sidebar
186        hiddenBarCloser.on('click', function() {
187            $('body').removeClass('visible-menu-bar');
188            hiddenBar.removeClass('visible-sidebar');
189        });
190    }
191
192
193    //Jquery Spinner / Quantity Spinner
194    if ($('.qty-spinner').length) {
195        $("input.qty-spinner").TouchSpin({
196            verticalbuttons: true
197        });
198    }
199
200
201
202    //Gallery Filters
203    if ($('.filter-list').length) {
204        $('.filter-list').mixItUp({});
205    }
206
207
208
209    //Custom Seclect Box
210    // if ($('.custom-select-box').length) {
211    //     $('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow');
212    // }
213
214
215
216    //Fact Counter + Text Count
217    if ($('.count-box').length) {
218        $('.count-box').appear(function() {
219
220            var $t = $(this),
221                n = $t.find(".count-text").attr("data-stop"),
222                r = parseInt($t.find(".count-text").attr("data-speed"), 10);
223
224            if (!$t.hasClass("counted")) {
225                $t.addClass("counted");
226                $({
227                    countNum: $t.find(".count-text").text()
228                }).animate({
229                    countNum: n
230                }, {
231                    duration: r,
232                    easing: "linear",
233                    step: function() {
234                        $t.find(".count-text").text(Math.floor(this.countNum));
235                    },
236                    complete: function() {
237                        $t.find(".count-text").text(this.countNum);
238                    }
239                });
240            }
241
242        }, { accY: 0 });
243    }
244
245
246
247    // Testimonial Section Four Carousel
248    if ($('.shop-detail-section').length) {
249        var thumbsCarousel = new Swiper('.shop-detail-section .thumbs-carousel', {
250            spaceBetween: 0,
251            slidesPerView: 4,
252
253            breakpoints: {
254                320: {
255                    spaceBetween: 10,
256
257                    slidesPerView: 3,
258                },
259                640: {
260                    spaceBetween: 10,
261
262                    slidesPerView: 4,
263                },
264                1023: {
265                    spaceBetween: 10,
266                    slidesPerView: 4,
267                }
268
269            }
270        });
271
272        var contentCarousel = new Swiper('.shop-detail-section .content-carousel', {
273            spaceBetween: 0,
274            loop: false,
275            navigation: {
276                nextEl: '.swiper-button-next',
277                prevEl: '.swiper-button-prev',
278            },
279            thumbs: {
280                swiper: thumbsCarousel
281            },
282        });
283    }
284
285
286
287    //Parallax Scene for Icons
288    if ($('.parallax-scene-1').length) {
289        var scene = $('.parallax-scene-1').get(0);
290        var parallaxInstance = new Parallax(scene);
291    }
292    if ($('.parallax-scene-2').length) {
293        var scene = $('.parallax-scene-2').get(0);
294        var parallaxInstance = new Parallax(scene);
295    }
296    if ($('.parallax-scene-3').length) {
297        var scene = $('.parallax-scene-3').get(0);
298        var parallaxInstance = new Parallax(scene);
299    }
300    if ($('.parallax-scene-4').length) {
301        var scene = $('.parallax-scene-4').get(0);
302        var parallaxInstance = new Parallax(scene);
303    }
304
305
306    // Project Carousel
307    if ($('.project-carousel').length) {
308        $('.project-carousel').owlCarousel({
309            loop: true,
310            margin: 30,
311            nav: true,
312            smartSpeed: 500,
313            autoplay: 4000,
314            navText: ['<span class="flaticon-left-arrow-1"></span>', '<span class="flaticon-right-arrow-1"></span>'],
315            responsive: {
316                0: {
317                    items: 1
318                },
319                480: {
320                    items: 1
321                },
322                600: {
323                    items: 2
324                },
325                800: {
326                    items: 2
327                },
328                1024: {
329                    items: 3
330                },
331                1400: {
332                    items: 4
333                }
334            }
335        });
336    }
337
338
339
340    // Services Carousel
341    if ($('.services-carousel').length) {
342        $('.services-carousel').owlCarousel({
343            loop: true,
344            margin: 30,
345            nav: true,
346            smartSpeed: 500,
347            autoplay: 4000,
348            navText: ['<span class="flaticon-left-arrow-1"></span>', '<span class="flaticon-right-arrow-1"></span>'],
349            responsive: {
350                0: {
351                    items: 1
352                },
353                480: {
354                    items: 1
355                },
356                600: {
357                    items: 2
358                },
359                800: {
360                    items: 2
361                },
362                1024: {
363                    items: 4
364                },
365                1400: {
366                    items: 4
367                }
368            }
369        });
370    }
371
372
373    // Team Carousel
374    if ($('.team-carousel').length) {
375        $('.team-carousel').owlCarousel({
376            loop: true,
377            margin: 15,
378            nav: true,
379            smartSpeed: 500,
380            autoplay: 4000,
381            navText: ['<span class="flaticon-left-arrow-1"></span>', '<span class="flaticon-right-arrow-1"></span>'],
382            responsive: {
383                0: {
384                    items: 1
385                },
386                480: {
387                    items: 1
388                },
389                600: {
390                    items: 2
391                },
392                800: {
393                    items: 2
394                },
395                1024: {
396                    items: 2
397                },
398                1400: {
399                    items: 3
400                }
401            }
402        });
403    }
404
405
406    // Project Carousel Two
407    if ($('.project-carousel-two').length) {
408        $('.project-carousel-two').owlCarousel({
409            loop: true,
410            margin: 30,
411            nav: true,
412            smartSpeed: 500,
413            autoplay: 4000,
414            navText: ['<span class="flaticon-left-arrow-1"></span>', '<span class="flaticon-right-arrow-1"></span>'],
415            responsive: {
416                0: {
417                    items: 1
418                },
419                480: {
420                    items: 1
421                },
422                600: {
423                    items: 2
424                },
425                800: {
426                    items: 2
427                },
428                1024: {
429                    items: 3
430                },
431                1400: {
432                    items: 3
433                }
434            }
435        });
436    }
437
438
439
440    if ($('.paroller').length) {
441        $('.paroller').paroller({
442            factor: 0.2, // multiplier for scrolling speed and offset, +- values for direction control  
443            factorLg: 0.4, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control  
444            type: 'foreground', // background, foreground  
445            direction: 'horizontal' // vertical, horizontal  
446        });
447    }
448
449
450
451    //Price Range Slider
452    if ($('.price-range-slider').length) {
453        $(".price-range-slider").slider({
454            range: true,
455            min: 0,
456            max: 10000,
457            values: [1000, 8000],
458            slide: function(event, ui) {
459                $("input.price-amount").val(ui.values[0] + " - " + ui.values[1]);
460            }
461        });
462
463        $("input.price-amount").val($(".price-range-slider").slider("values", 0) + " - $" + $(".price-range-slider").slider("values", 1));
464    }
465
466
467    //Custom Seclect Box
468    // if ($('.custom-select-box').length) {
469    //     $('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow');
470    // }
471
472
473
474    //Main Slider Carousel
475    if ($('.main-slider-carousel').length) {
476        $('.main-slider-carousel').owlCarousel({
477            animateOut: 'fadeOut',
478            animateIn: 'fadeIn',
479            loop: true,
480            margin: 0,
481            nav: true,
482            //autoHeight: true,
483            smartSpeed: 500,
484            autoplay: false,
485            navText: ['<span class="flaticon-left"></span>', '<span class="flaticon-right"></span>'],
486            responsive: {
487                0: {
488                    items: 1
489                },
490                600: {
491                    items: 1
492                },
493                800: {
494                    items: 1
495                },
496                1024: {
497                    items: 1
498                },
499                1200: {
500                    items: 1
501                }
502            }
503        });
504    }
505
506
507
508    // Banner Carousel
509    if ($('.banner-carousel').length) {
510        $('.banner-carousel').owlCarousel({
511            animateOut: 'fadeOut',
512            animateIn: 'fadeIn',
513            loop: true,
514            margin: 30,
515            nav: true,
516            //autoHeight: true,
517            smartSpeed: 500,
518            autoplay: 6000,
519            navText: ['<span class="flaticon-left"></span>', '<span class="flaticon-right"></span>'],
520            responsive: {
521                0: {
522                    items: 1
523                },
524                600: {
525                    items: 1
526                },
527                800: {
528                    items: 2
529                },
530                1024: {
531                    items: 2
532                },
533                1200: {
534                    items: 2
535                }
536            }
537        });
538    }
539
540
541
542    // Single Item Carousel
543    if ($('.single-item-carousel').length) {
544        $('.single-item-carousel').owlCarousel({
545            //animateOut: 'fadeOut',
546            //animateIn: 'fadeIn',
547            loop: true,
548            margin: 0,
549            nav: true,
550            //autoHeight: true,
551            smartSpeed: 500,
552            autoplay: 6000,
553            navText: ['<span class="flaticon-left"></span>', '<span class="flaticon-right"></span>'],
554            responsive: {
555                0: {
556                    items: 1
557                },
558                600: {
559                    items: 1
560                },
561                800: {
562                    items: 1
563                },
564                1024: {
565                    items: 1
566                },
567                1200: {
568                    items: 1
569                }
570            }
571        });
572    }
573
574
575    // Print Carousel
576    if ($('.print-carousel').length) {
577        $('.print-carousel').owlCarousel({
578            loop: true,
579            margin: 0,
580            nav: true,
581            smartSpeed: 500,
582            autoplay: 4000,
583            navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
584            responsive: {
585                0: {
586                    items: 1
587                },
588                480: {
589                    items: 1
590                },
591                600: {
592                    items: 1
593                },
594                800: {
595                    items: 1
596                },
597                1024: {
598                    items: 1
599                }
600            }
601        });
602    }
603
604
605    // Three Item Carousel
606    if ($('.three-item-carousel').length) {
607        $('.three-item-carousel').owlCarousel({
608            loop: true,
609            margin: 20,
610            nav: true,
611            smartSpeed: 500,
612            autoplay: 4000,
613            navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
614            responsive: {
615                0: {
616                    items: 1
617                },
618                480: {
619                    items: 1
620                },
621                600: {
622                    items: 2
623                },
624                800: {
625                    items: 2
626                },
627                1024: {
628                    items: 2
629                },
630                1200: {
631                    items: 3
632                },
633                1400: {
634                    items: 3
635                }
636            }
637        });
638    }
639
640
641    // Sponsors Carousel
642    if ($('.sponsors-carousel').length) {
643        $('.sponsors-carousel').owlCarousel({
644            loop: true,
645            margin: 30,
646            nav: true,
647            smartSpeed: 500,
648            autoplay: 4000,
649            navText: ['<span class="flaticon-left-arrow"></span>', '<span class="flaticon-right-arrow"></span>'],
650            responsive: {
651                0: {
652                    items: 1
653                },
654                480: {
655                    items: 2
656                },
657                600: {
658                    items: 3
659                },
660                800: {
661                    items: 4
662                },
663                1024: {
664                    items: 5
665                }
666            }
667        });
668    }
669
670
671
672    //Accordion Box
673    if ($('.accordion-box').length) {
674        $(".accordion-box").on('click', '.acc-btn', function() {
675
676            var outerBox = $(this).parents('.accordion-box');
677            var target = $(this).parents('.accordion');
678
679            if ($(this).hasClass('active') !== true) {
680                $(outerBox).find('.accordion .acc-btn').removeClass('active');
681            }
682
683            if ($(this).next('.acc-content').is(':visible')) {
684                return false;
685            } else {
686                $(this).addClass('active');
687                $(outerBox).children('.accordion').removeClass('active-block');
688                $(outerBox).find('.accordion').children('.acc-content').slideUp(300);
689                target.addClass('active-block');
690                $(this).next('.acc-content').slideDown(300);
691            }
692        });
693    }
694
695
696
697    //Tabs Box
698    if ($('.tabs-box').length) {
699        $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) {
700            e.preventDefault();
701            var target = $($(this).attr('data-tab'));
702
703            if ($(target).is(':visible')) {
704                return false;
705            } else {
706                target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn');
707                $(this).addClass('active-btn');
708                target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0);
709                target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab');
710                $(target).fadeIn(300);
711                $(target).addClass('active-tab');
712            }
713        });
714    }
715
716
717
718    //Masonary
719    function enableMasonry() {
720        if ($('.masonry-items-container').length) {
721
722            var winDow = $(window);
723            // Needed variables
724            var $container = $('.masonry-items-container');
725
726            $container.isotope({
727                itemSelector: '.masonry-item',
728                masonry: {
729                    columnWidth: '.masonry-item.col-lg-4'
730                },
731                animationOptions: {
732                    duration: 500,
733                    easing: 'linear'
734                }
735            });
736
737            winDow.bind('resize', function() {
738
739                $container.isotope({
740                    itemSelector: '.masonry-item',
741                    animationOptions: {
742                        duration: 500,
743                        easing: 'linear',
744                        queue: false
745                    }
746                });
747            });
748        }
749    }
750
751    enableMasonry();
752
753
754
755
756
757
758
759
760
761
762
763
764    //Masonary
765    function enableMasonryTwo() {
766        if ($('.masonry-items-container-two').length) {
767
768            var winDow = $(window);
769            // Needed variables
770            var $container = $('.masonry-items-container-two');
771
772            $container.isotope({
773                itemSelector: '.masonry-item',
774                masonry: {
775                    columnWidth: '.masonry-item.col-lg-3'
776                },
777                animationOptions: {
778                    duration: 500,
779                    easing: 'linear'
780                }
781            });
782
783            winDow.bind('resize', function() {
784
785                $container.isotope({
786                    itemSelector: '.masonry-item',
787                    animationOptions: {
788                        duration: 500,
789                        easing: 'linear',
790                        queue: false
791                    }
792                });
793            });
794        }
795    }
796
797    enableMasonryTwo();
798
799
800
801
802
803
804
805
806    function sortableMasonry() {
807        if ($('.sortable-masonry').length) {
808
809            var winDow = $(window);
810            // Needed variables
811            var $container = $('.sortable-masonry .items-container');
812            var $filter = $('.filter-btns');
813
814            $container.isotope({
815                filter: '*',
816                masonry: {
817                    columnWidth: '.masonry-item.col-lg-3'
818                },
819                animationOptions: {
820                    duration: 500,
821                    easing: 'linear'
822                }
823            });
824            // Isotope Filter 
825            $filter.find('li').on('click', function() {
826                var selector = $(this).attr('data-filter');
827
828                try {
829                    $container.isotope({
830                        filter: selector,
831                        animationOptions: {
832                            duration: 500,
833                            easing: 'linear',
834                            queue: false
835                        }
836                    });
837                } catch (err) {
838
839                }
840                return false;
841            });
842
843
844            winDow.bind('resize', function() {
845                var selector = $filter.find('li.active').attr('data-filter');
846
847                $container.isotope({
848                    filter: selector,
849                    animationOptions: {
850                        duration: 500,
851                        easing: 'linear',
852                        queue: false
853                    }
854                });
855            });
856
857
858            var filterItemA = $('.filter-btns li');
859
860            filterItemA.on('click', function() {
861                var $this = $(this);
862                if (!$this.hasClass('active')) {
863                    filterItemA.removeClass('active');
864                    $this.addClass('active');
865                }
866            });
867        }
868    }
869    sortableMasonry();
870
871
872    //Progress Bar
873    if ($('.progress-line').length) {
874        $('.progress-line').appear(function() {
875            var el = $(this);
876            var percent = el.data('width');
877            $(el).css('width', percent + '%');
878        }, { accY: 0 });
879    }
880
881
882    // inhover active start
883    $(".service-block-two").on('mouseenter', function() {
884        $(".service-block-two").removeClass("active");
885        $(this).addClass("active");
886    });
887    // nhover active start
888
889
890
891    //LightBox Image
892    if ($('.lightbox-image').length) {
893        $('.lightbox-image').magnificPopup({
894            type: 'image',
895            gallery: {
896                enabled: true
897            },
898            
899        });
900    }
901
902
903
904    //LightBox Video
905    if ($('.lightbox-video').length) {
906        $('.lightbox-video').magnificPopup({
907            // disableOn: 700,
908            type: 'iframe',
909            mainClass: 'mfp-fade',
910            removalDelay: 160,
911            preloader: false,
912            iframe: {
913                patterns: {
914                    youtube: {
915                        index: 'youtube.com',
916                        id: 'v=',
917                        src: 'https://www.youtube.com/embed/%id%'
918                    },
919                },
920                srcAction: 'iframe_src',
921            },
922            fixedContentPos: false
923        });
924    }
925
926
927    // Odometer
928    if ($(".odometer").length) {
929        $('.odometer').appear();
930        $('.odometer').appear(function() {
931            var odo = $(".odometer");
932            odo.each(function() {
933                var countNumber = $(this).attr("data-count");
934                $(this).html(countNumber);
935            });
936            window.odometerOptions = {
937                format: 'd',
938            };
939        });
940    }
941
942
943    //Contact Form Validation
944    if ($('#contact-form').length) {
945        $('#contact-form').validate({
946            rules: {
947                username: {
948                    required: true
949                },
950                phone: {
951                    required: true
952                },
953                services: {
954                    required: true
955                },
956                subject: {
957                    required: true
958                },
959                message: {
960                    required: true
961                }
962            }
963        });
964    }
965
966
967
968    // Scroll to a Specific Div
969    if ($('.scroll-to-target').length) {
970        $(".scroll-to-target").on('click', function() {
971            var target = $(this).attr('data-target');
972            // animate
973            $('html, body').animate({
974                scrollTop: $(target).offset().top
975            }, 1500);
976
977        });
978    }
979
980
981
982    // Elements Animation
983    if ($('.wow').length) {
984        var wow = new WOW({
985            boxClass: 'wow', // animated element css class (default is wow)
986            animateClass: 'animated', // animation css class (default is animated)
987            offset: 0, // distance to the element when triggering the animation (default is 0)
988            mobile: true, // trigger animations on mobile devices (default is true)
989            live: true // act on asynchronously loaded content (default is true)
990        });
991        wow.init();
992    }
993
994
995    $(".category-list .sub-level .cate_item i").on("click", function() {
996        $(this).parent().toggleClass('active');
997
998        $(this).parent().next(".sublinks").slideToggle("slow");
999    });
1000
1001    /* ==========================================================================
1002       When document is Scrollig, do
1003       ========================================================================== */
1004
1005    $(window).on('scroll', function() {
1006        headerStyle();
1007    });
1008
1009    $(".modal.fade .close").click(function () {
1010        $(".modal.fade").removeClass("show")
1011    })
1012
1013    
1014
1015
1016
1017    /* ==========================================================================
1018       When document is loading, do
1019       ========================================================================== */
1020
1021    $(window).on('load', function() {
1022
1023        enableMasonry();
1024        enableMasonryTwo();
1025        sortableMasonry();
1026    });
1027
1028
1029    var inum = 0;
1030
1031    // if (localStorage.getItem("goods") !== null) {
1032    //     var igoods = localStorage.getItem("goods");
1033
1034    //     console.log(JSON.parse(igoods))
1035    //     var ngoods = JSON.parse(igoods);
1036
1037    //     inum = ngoods.length
1038    // }
1039
1040    if (localStorage.getItem("inum") !== 0) {
1041        inum = localStorage.getItem("inum");
1042    }
1043
1044    if (inum > 0) {
1045        $(".total-cart").text(inum);
1046    } else {
1047        $(".total-cart").hide();
1048    }
1049
1050
1051
1052})(window.jQuery);
1053
1054
1055function showmodal() {
1056    console.log(1)
1057    $("#myModal").addClass("show")
1058
1059}

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.