PageSourceSearch

https://home.chungwoon.ac.kr/site/intro/js/intro.js

js chungwoon.ac.kr collected 2026-10-02 17:35:38 UTC 7,496 bytes, 277 lines download raw bytes

1
2
3(function($) {
4    'use strict';
5
6    var $window = $(window),
7        $document = $(document),
8        $html = $('html'),
9        $head = $('head'),
10		$screen = $.screen,
11        $inArray = $.inArray;
12
13    //브라우저
14    var _browser = navigator.userAgent.toLowerCase();
15
16    //ie7일 때
17    if(_browser.indexOf('msie 7.0') > -1) {
18        _browser = 'ie7';
19
20    //ie8일 때
21    }else if(_browser.indexOf('msie 8.0') > -1) {
22        _browser = 'ie8';
23
24    //ie9일 때
25    }else if(_browser.indexOf('msie 9.0') > -1) {
26        _browser = 'ie9';
27
28    //ie10일 때
29    }else if(_browser.indexOf('msie 10.0') > -1) {
30        _browser = 'ie10';
31
32    //ie11일 때
33    }else if(_browser.indexOf('trident/7.0') > -1) {
34        _browser = 'ie11';
35
36    //edge일 때
37    }else if(_browser.indexOf('edge') > -1) {
38        _browser = 'edge';
39
40    //opera일 때
41    }else if(_browser.indexOf('opr') > -1) {
42        _browser = 'opera';
43
44    //chrome일 때
45    }else if(_browser.indexOf('chrome') > -1) {
46        _browser = 'chrome';
47
48    //firefox일 때
49    }else if(_browser.indexOf('firefox') > -1) {
50        _browser = 'firefox';
51
52    //safari일 때
53    }else if(_browser.indexOf('safari') > -1) {
54        _browser = 'safari';
55    }else{
56        _browser = 'unknown';
57    }
58
59    /**
60     * @name 브라우저 얻기
61     * @since 2017-12-06
62     * @return {string}
63     */
64    window.getBrowser = function() {
65        return _browser;
66    };
67
68    //브라우저 클래스 추가
69    $html.addClass(_browser);
70
71    $(function() {
72        var $body = $('body'),
73            $htmlAndBody = $html.add($body),
74            $wrapper = $('#wrapper'),
75            $header = $('#header'),
76            $container = $('#container'),
77            $footer = $('#footer');
78
79		
80        $window.on('screen:wide screen:web', function(event) {
81            window.mode = 'pc';
82        });
83
84        $window.on('screen:tablet screen:phone', function(event) {
85            window.mode = 'mobile';
86        });
87		
88		$window.on('scroll', function(event) {
89			var scrollTop = $window.scrollTop(),
90				ContainerOffset = $('#container').offset(),
91				scrollBottom = scrollTop + $window.height(),
92				footerOffset = $('#footer').offset();
93			if(scrollTop > 0) {
94				$wrapper.addClass('active');
95			}else{
96				$wrapper.removeClass('active');
97			};
98			
99			if(scrollBottom > footerOffset.top) {
100				//$('.topgobox').addClass('active');
101			}else{
102				//$('.topgobox').removeClass('active');
103			};
104		});
105		
106		//header_top
107		$('.header_top .linkbox .link_btn').on('click', function(event) {
108			var $this = $(this),
109				$linkbox = $this.parents('.linkbox'),
110				IsActive = $linkbox.is('.active'),
111				$Layer = $this.siblings('.layer');
112			if(!IsActive){
113				$linkbox.addClass('active');
114				$this.attr('title', '하위목록닫기');
115				$Layer.slideDown();
116			} else{
117				$linkbox.removeClass('active');
118				$this.attr('title', '하위목록열기');
119				$Layer.slideUp();
120			};
121		});
122		
123		$('.searchbox .search .total_search').on('focusin', function(event) {
124			var $this = $(this),
125				$searchbox = $this.parents('.searchbox');
126			$searchbox.addClass('focusin');
127		}).on('focusout', function(event) {
128			var $this = $(this),
129				$searchbox = $this.parents('.searchbox');
130			$searchbox.removeClass('focusin');
131		});
132		
133		var $lnbShowBtn = $('.topgobox .btnbox .lnbbtn, .lnbbtnbox .lnbbtn');
134        $lnbShowBtn.on('click', function(event) {
135            $html.addClass('lnb_show');
136        });
137		var $lnbHideBtn = $('.lnb_close');
138        $lnbHideBtn.on('click', function(event) {
139			var NowState = $.screen.settings.state[0];
140            $html.removeClass('lnb_show');
141			if(NowState=='wide'||NowState=='web'){
142				$('.topgobox .btnbox .lnbbtn').focus();
143			}
144        });
145		$('.lnb_curtain button').on('click', function(event) {
146			var NowState = $.screen.settings.state[0];
147            $html.removeClass('lnb_show');
148			if(NowState=='wide'||NowState=='web'){
149				$('.topgobox .btnbox .lnbbtn').focus();
150			}
151        });
152		
153		//모바일1차메뉴
154		$('.lnbbox .lnb .menu button.depth1_text').on('click', function(event) {
155			var $this = $(this),
156				$Myparent = $this.parent('.depth1_item'),
157				IsActive = $Myparent.is('.active'),
158				$MyDepth2 = $this.siblings('.depth2'),
159				$OtherParents = $('.lnbbox .lnb .menu .campusbox').not(':first-child').find('.depth1_item'),
160				$OtherDepth2 = $OtherParents.find('.depth2');
161			if(!IsActive){
162				$OtherParents.removeClass('active');
163				$OtherDepth2.slideUp();
164				$Myparent.addClass('active');
165				$MyDepth2.slideDown();
166			} else{
167				$Myparent.removeClass('active');
168				$MyDepth2.slideUp();
169			};
170		});
171		
172		var $PopupSlide = $('.popup .popup_list');
173		var PopupLength = $('.popup .popup_list .popup_item').length;
174		$('.popup_count .total').text(PopupLength);
175		$PopupSlide.slick({
176			autoplay : true,
177			dots:false,
178			slidesToShow: 2,
179			slidesToScroll: 1,
180			infinite: true,
181			prevArrow : $('.popup_control .prev'),
182			nextArrow : $('.popup_control .next'),
183			pauseOnDotsHover : true,
184			swipe:false,
185			draggable:false,
186			//추가 기능
187			autoArrow : $('.popup_control .auto'),
188			isRunOnLowIE : false,
189			pauseOnArrowClick : true,
190			pauseOnDirectionKeyPush : true,
191			pauseOnSwipe : true,
192			pauseOnDotsClick : true,
193			pauseText : '정지',
194			playText : '재생',
195			//total : $('.popup_count .total'),
196			current : $('.popup_count .current'),
197			responsive: [
198			{
199			  breakpoint: 1001,
200			  settings: {
201				swipe:true,
202				draggable:true,
203				variableWidth: true,
204				slidesToShow: 1
205			  }
206			}]
207		});
208		
209		//게시판
210		$('.board ul li.list .board_btn').on('click', function(event) {
211			var $this = $(this),
212				$List = $this.parent('li.list'),
213				IsActive = $List.is('.active'),
214				NowState = $.screen.settings.state[0],
215				$MyLayer = $this.siblings('.layer');
216			if(!IsActive){
217				$List.addClass('active');
218				$this.attr('title', '리스트닫기');
219				if(NowState=='phone'){
220					$MyLayer.slideDown();
221				}
222			} else{
223				$List.removeClass('active');
224				$this.attr('title', '리스트보기');
225				if(NowState=='phone'){
226					$MyLayer.slideUp();
227				}
228			};
229		});
230
231
232        $window.on('screen:wide screen:web', function(event) {
233            
234        });
235
236        $window.on('screen:tablet screen:phone', function(event) {
237            
238        });
239    });
240
241    $document.on('ready', function(event) {
242        $screen({
243            state : [{
244                name : 'wide',
245                horizontal : {
246                    from : 9999,
247                    to : 1201
248                }
249            }, {
250                name : 'web',
251                horizontal : {
252                    from : 1200,
253                    to : 1001
254                }
255            }, {
256                name : 'tablet',
257                horizontal : {
258                    from : 1000,
259                    to : 641
260                }
261            }, {
262                name : 'phone',
263                horizontal : {
264                    from : 640,
265                    to : 0
266                }
267            }]
268        });
269    });
270
271    $window.on('load', function(event) {
272
273        $window.on('screen:resize', function(event) {
274            
275        }).triggerHandler('screen:resize');
276    });
277})(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.