PageSourceSearch

https://www.3917majung.com/modules/user/js/comn.js

js 3917majung.com collected 2026-10-07 21:57:12 UTC 3,816 bytes, 146 lines download raw bytes

1
2/*************************************************************************************************
3 
4 *  Common JS
5 
6 *************************************************************************************************/
7
8$(function(){
9	
10	"use strict";
11
12/*-----------------------------------------------------------------------------
13 *  Header Fix
14 *----------------------------------------------------------------------------*/
15  
16function checkScroll() {
17  if ($(document).scrollTop() > 0) {
18    $("#hdr").addClass("fix");
19  } else {
20    $("#hdr").removeClass("fix");
21  }
22}
23
24// 스크롤 이벤트
25$(window).on("scroll", checkScroll);
26
27// 로드 시 초기화
28$(function() {
29  checkScroll();
30});
31  
32  
33/*-----------------------------------------------------------------------------
34 *  Mobile Menu
35 *----------------------------------------------------------------------------*/
36	
37    $("#menu-toggle").click(function(){
38      $(".menuMo").animate({"right":"0"}, 200);
39      $(".menuBackBg").fadeIn();
40      return false;
41    });
42    
43	$(".mobile_menu_btn, .menuBackBg").click(function(){
44		$(".menuMo").animate({"right":"-300px"}, 200);
45    $(".menuBackBg").fadeOut();
46		return false;
47	});
48	
49	$(".menuMo > ul > li > a").click(function(){
50		$(".subMenu").slideUp("fast");
51		$(".mMenu").removeClass("active");
52		if(!$(this).next("div.subMenu").is(":visible")) {
53			$(this).next("div.subMenu").slideDown("fast");
54			$(this).addClass("active");
55		}
56		return false;
57	});
58	
59	$(".menuMo ul  li  ul  li a").click(function(){
60		$(".menuMo ul  li  ul  li a").removeClass("active");
61	});
62	
63	$(window).resize(function(){
64		
65		if ($(window).width() > 960) {
66			$(".menuMo").animate({"right":"-300px"}, 200);
67      $(".menuBackBg").fadeOut();
68		}
69		
70	}); 
71
72  
73/*-----------------------------------------------------------------------------
74 *  Gnb
75 *----------------------------------------------------------------------------*/
76  
77  $("nav#navGnb > ul > li").on("mouseover",function(){
78      $(this).find(".subMenu").stop().fadeIn("fast");
79      $(this).find(".subMenu").css("margin-bottom",0);
80  });
81  $("nav#navGnb > ul > li").on("mouseout",function(){
82      $(this).find(".subMenu").stop().fadeOut("fast");
83      $(this).find(".subMenu").css("margin-bottom","-20px");
84  });
85  
86  
87/*-----------------------------------------------------------------------------
88 *  Tabs
89 *----------------------------------------------------------------------------*/
90
91  $('.tab').each(function(item){
92    $(this).click(function(){
93      $(this).addClass('tabs_head_active').siblings().removeClass('tabs_head_active');
94      $($('.tabs_item')[item]).fadeIn().siblings().hide();
95    });
96  });
97  
98  
99  
100  
101  
102});
103
104
105/*---------------------------------------------------------------------------------------------------------------------------
106 *  Btn Top
107 *--------------------------------------------------------------------------------------------------------------------------*/
108
109(function($) {
110    
111    var methods = {
112        to_top: function() {
113            $('html, body').animate({
114                scrollTop: 0
115            }, 1000);
116            return false;
117        }
118    };
119
120    $.fn.tottTop = function(options) {
121
122        var settings = $.extend({
123            scrollTop: 800, 
124            duration: 1000, 
125            scrtollTopBtnDuration: 400
126        }, options);
127
128        return this.each(function() {
129            var $this = $(this);
130
131            var win = $(window);
132
133            win.scroll(function() {
134                if (win.scrollTop() > settings.scrollTop) {
135                    $this.fadeIn(settings.scrtollTopBtnDuration);
136                } else {
137                    $this.fadeOut(settings.scrtollTopBtnDuration);
138                }
139            });
140
141            $this.click(methods.to_top);
142        });
143
144    };
145})(jQuery);
146

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.