PageSourceSearch

https://oscom.co.kr/theme/sample28/js/menu.js?ver=2304171

js oscom.co.kr collected 2026-09-30 04:57:05 UTC 3,452 bytes, 151 lines download raw bytes

1$(function() {
2  var btn_html = $('#login-box').html();
3  $('#login-box2').html(btn_html);
4  $('#login-box3').html(btn_html);
5
6  $('#login-box, #login-box2, #login-box3').on('click', '.btn-pop-search', function(e) {
7    e.preventDefault();
8    $('#hd_sch_wrapper').bPopup();
9  });
10
11  var lnb_idx = 0;
12  var lnb_size = 4;
13  var $lnb_lis = $('#lnb>ul>li');
14  var lnb_li_cnt = $lnb_lis.length;
15  function show_lnb_menu() {
16    $lnb_lis.removeClass('hide');
17    $lnb_lis.each(function (index, element) {
18      var $this = $(element);
19      
20      if(index < lnb_idx) {
21        $this.addClass('hide');
22      } 
23      if(index >= (lnb_idx + lnb_size)) {
24        $this.addClass('hide');
25      }
26    });
27  }
28  show_lnb_menu();
29
30
31  $('#menu-ctl .prev').mouseenter(function (e) {
32    e.stopPropagation();
33  });
34  $('#menu-ctl .prev').click(function (e) { 
35    e.preventDefault();
36
37    if(lnb_idx < (lnb_li_cnt - lnb_size)) lnb_idx++;
38    else lnb_idx = 0;
39    show_lnb_menu();
40  });
41  
42
43  $("#lnb ul.depth1 > li").mouseenter(function() {
44    $(this)
45      .find(">ul")
46      .stop()
47      .slideDown(400);
48  });
49  $("#lnb ul.depth1 > li").mouseleave(function() {
50    $(this)
51      .find(">ul")
52      .stop()
53      .slideUp(400);
54  });
55  $("#lnb ul.depth2 > li").mouseenter(function() {
56    $(this)
57      .find(">ul")
58      .stop()
59      .show(400);
60  });
61  $("#lnb ul.depth2 > li").mouseleave(function() {
62    $(this)
63      .find(">ul")
64      .stop()
65      .hide(400);
66  });
67
68  //var header_offset_top = $('#header').offset().top;
69  var header_offset_top = 90;
70  var $header = $("#header");
71  $(window).scroll(function() {
72    if ($(window).scrollTop() > header_offset_top) {
73      $header.addClass("fixed");
74    } else {
75      $header.removeClass("fixed");
76    }
77  });
78
79  //모바일
80  $("#btn-menu-m").on("click", function(e) {
81    e.preventDefault();
82    var $btn = $(this);
83    var $menu_box = $("#m-lnb-wrapper");
84    if (!$btn.hasClass("active")) {
85      $btn.addClass("active");
86      $menu_box.addClass("on");
87    } else {
88      $btn.removeClass("active");
89      $menu_box.removeClass("on");
90    }
91  });
92});
93
94$(function() {
95  $("#m-lnb>ul li>span").click(function(e) {
96    var $li = $(this).parent();
97    if (!$li.hasClass("on")) {
98      var $ul = $li.parent();
99      $ul.find(">li").each(function() {
100        var $e_li = $(this);
101        if ($li[0] != $e_li[0]) {
102          $e_li.removeClass("on");
103          $e_li
104            .find(">ul")
105            .stop()
106            .slideUp();
107        }
108      });
109      $li.addClass("on");
110      $li
111        .find(">ul")
112        .stop()
113        .slideDown();
114    } else {
115      $li.removeClass("on");
116      $li
117        .find(">ul")
118        .stop()
119        .slideUp();
120    }
121  });
122});
123
124$(function() {
125  $(".select-nav button,.select-nav .down").click(function() {
126    var $select = $(this).parent();
127    if (!$select.hasClass("on")) {
128      $select.addClass("on");
129      $select
130        .find(">ul")
131        .stop()
132        .slideDown();
133    } else {
134      $select.removeClass("on");
135      $select
136        .find(">ul")
137        .stop()
138        .slideUp(400);
139    }
140  });
141  /*
142  $(".select-nav .select").mouseleave(function() {
143    var $select = $(this);
144    $select.removeClass("on");
145    $select
146      .find(">ul")
147      .stop()
148      .slideUp(400);
149  });
150  */
151});

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.