PageSourceSearch

https://www.cyber.co.kr/book/assets/js/mobile.sidemenu.js

js cyber.co.kr collected 2026-10-04 05:50:39 UTC 2,582 bytes, 99 lines download raw bytes

1jQuery(function($) {
2	var $btn_side = $('#btn_side'),
3		$side_menu = $('#side_menu'),
4		$side_wr = $('#side_menu .side_wr'),
5		side_obj = { my : {} },
6		is_trans_sup = supportsTransitions();
7
8	$side_wr.css({'right':'-250px'});	//초기화
9
10	side_obj.destory = function(){
11		if ( ! is_trans_sup ) return;
12		side_obj.my.destroy();
13	}
14	side_obj.refresh = function(){
15		if ( ! is_trans_sup ) return;
16		side_obj.my.refresh();
17	}
18
19	function iscroll_loaded() {
20		if ( is_trans_sup ){
21			$side_wr.removeClass('add_side_wr');
22			side_obj.my = new IScroll('#isroll_wrap', { bounceTime : 400, mouseWheel: true, click: true, hScroll:false });
23		}
24	}
25
26	$('#isroll_wrap').on('touchmove', function(e){
27		e.preventDefault();
28	});
29
30	function supportsTransitions() {
31		var b = document.body || document.documentElement,
32			s = b.style,
33			p = 'transition';
34
35		if (typeof s[p] === 'string') { return true; }
36
37		// Tests for vendor specific prop
38		var v = ['Moz', 'webkit', 'Webkit', 'Khtml', 'O', 'ms'];
39		p = p.charAt(0).toUpperCase() + p.substr(1);
40
41		for (var i = 0; i < v.length; i++) {
42			if (typeof s[v[i] + p] === 'string') { return true; }
43		}
44
45		return false;
46	}
47
48	$btn_side.on('click', function() {
49		if ( ! $(this).data('toggle_enable')) {
50			$(this).data('toggle_enable', true);
51			$side_menu.show();
52			$side_wr.animate({'right': '0px'}, 200, function(){
53				height_update($(this));
54				iscroll_loaded();
55			});
56		} else {
57			remove_side_data();
58		}
59	});
60
61	function height_update(target){
62		var side_wr_height = target.height();
63		$('body').css({'min-height': side_wr_height + 'px'});
64	}
65
66	function remove_side_data(){
67		$btn_side.data('toggle_enable', false);
68		$side_wr.animate({'right': '-250px'}, 160, function(){
69			$side_menu.hide();
70			$('body').css({'min-height':''});
71			side_obj.my.destroy();
72		});
73	}
74
75	$('#side_menu .side_wr').on('clickoutside', function(e){
76		if ( ! $(e.target).closest('#btn_side').length && $btn_side.data('toggle_enable')){
77			remove_side_data();
78		}
79	});
80
81	var clickEventType= 'ontouchend' in document ? 'touchend' : 'click';
82
83	if( clickEventType == 'touchend'){
84		$(document).on(clickEventType, function(e){
85			if ( $side_wr.has(e.target).length === 0 && $btn_side.data('toggle_enable')){
86				remove_side_data();
87			}
88		});
89	}
90
91	$(document).on(clickEventType, '.subopen', function(){
92		$submenu = $('.drop-downorder-' + $(this).attr('data-menu-order'));
93		$submenu.toggle(function(){
94			height_update($side_wr);
95			side_obj.my.refresh();
96		});
97	});
98
99});

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.