PageSourceSearch

https://7-11.com.tw/js/menu.js?202604201

js 7-11.com.tw collected 2026-10-01 10:28:58 UTC 5,098 bytes, 121 lines download raw bytes

1
2
3(function ($) {
4
5    var chk = false;
6    $.fn.menumaker = function (options) {
7        var cssmenu = $(this), settings = $.extend({
8            format: "dropdown",
9            sticky: false
10        }, options);
11        return this.each(function () {
12            $(this).find("a#menu-btn").on('click', function () {
13                $(this).toggleClass('menu-opened');
14
15                //Ãö³¬ ¤â¾÷ª©¥~°ê»y¨t¿ï³æ
16                $(".m-lansubmenu.mobile").css("display", "none");
17
18                var mainmenu = $(this).siblings('ul.u-menu');
19                if (mainmenu.hasClass('open')) {
20                    mainmenu.slideToggle().removeClass('open');
21                }
22                else {              
23                      mainmenu.slideToggle().addClass('open');
24                    if (settings.format === "dropdown") {
25                        // mainmenu.find('li ul.m-navitem-subitem').show();
26                        mainmenu.find('li ul.m-navitem-subitem').show();
27                    }
28                }
29                if (chk == false) {
30                    $(".g-nav").attr("style", "position:absolute");
31                    $(".g-main").attr("style", "position:fixed");
32                    $(".m-topbar").attr("style", "position:absolute");
33                    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
34                        $(".u-searchbtn").attr("style", "position: fixed;top: 19px;left: 73px;");
35                    }
36                    else {
37                        $(".u-searchbtn").attr("style", "position: fixed;top: 19px;left: 73px;");
38                    }
39                    chk = true;
40                    return;
41                }
42                if (chk == true) {
43                    $(".g-nav").attr("style", "position:fixed");
44                    $(".g-main").attr("style", "position:relative");
45                    $(".m-topbar").attr("style", "position:fixed");
46                    $(".u-searchbtn").attr("style", "position: fixed;top: 19px;left: 73px;");
47                    chk = false;
48                    return;
49                }
50            });
51
52            var index = 0;
53            cssmenu.find('li ul.m-navitem-subitem').parent().parent().parent().addClass('has-sub');
54            multiTg = function () {
55                cssmenu.find(".has-sub").prepend('<span class="submenu-button"></span>');
56                cssmenu.find('.submenu-button').on('click', function () {
57                    // ÂI¦P¤@­Óªº±¡ªp
58                    if ($(this).siblings('.m-subitem-wrapper ').hasClass('open')) {
59                        if ($(this).hasClass('submenu-button submenu-opened')) {
60                            $(this).siblings('.m-subitem-wrapper').removeClass('open').slideToggle();
61                            $(this).attr('class','submenu-button');
62                            return;
63                        }
64                    }
65                    //ÂI¨ä¥Lªº±¡ªp
66                    $("span.submenu-button.submenu-opened").attr("class", "submenu-button");
67                    $("div.m-subitem-wrapper.open").attr("class", "m-subitem-wrapper");
68                    $(this).toggleClass('submenu-opened');
69                    if ($(this).siblings('.m-subitem-wrapper ').hasClass('m-subitem-wrapper')) {
70                        $('.m-subitem-wrapper').attr("style", "display:none;");
71                        $(".m-navitem-subitem").attr("style", "display:block;");
72                    }
73                    if ($(this).siblings('.m-subitem-wrapper ').hasClass('open')) {
74                        $(this).siblings('.m-subitem-wrapper').removeClass('open').slideToggle();
75
76                        $('.m-subitem-wrapper').attr("style", "display:none;");
77                        $(".m-navitem-subitem").removeClass('open').slideToggle();
78                        $(this).attr("class", "submenu-button");
79                    }
80
81                    else {
82                        $(this).siblings('.m-subitem-wrapper').addClass('open').slideToggle();
83                    }
84                    
85            });
86            };
87
88            if (settings.format === 'multitoggle') multiTg();
89            else cssmenu.addClass('dropdown');
90
91            if (settings.sticky === true) cssmenu.css('position', 'fixed');
92            resizeFix = function () {
93                //var mediasize = 850;
94                //if ($(window).width() > mediasize) {
95                //    cssmenu.find('ul').show();
96                //}
97                //cssmenu.find('ul').show();
98                //if ($(window).width() <= mediasize) {
99                //    cssmenu.find('ul').hide().removeClass('open');
100                //}
101            };
102            resizeFix();
103            return $(window).on('resize', resizeFix);
104
105        });
106
107
108    };
109})(jQuery);
110
111(function ($) {
112    $(document).ready(function () {
113        $("#nav").menumaker({
114            format: "multitoggle"
115
116        });
117
118    });
119
120
121})(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.