PageSourceSearch

https://gwdmall.kr/data/skin/2025gwdmall_1_1/common/responsive.js?v=86c7eed94707dab7fe91

js gwdmall.kr collected 2026-10-09 23:42:52 UTC 6,902 bytes, 218 lines download raw bytes

1window.onload=function(){
2    // 가로/세로 비율이 다른 썸네일 --> 정사각형으로 커팅
3	$('.board_gallery[data-type=type3] .board_thumb').each(function() {
4		var img_garo = $(this).width();
5		var img_sero = $(this).height();
6		if ( img_garo > img_sero ) {
7			$(this).closest('.item_img_area').addClass('garo');
8		} else if ( img_garo < img_sero ) {
9			$(this).closest('.item_img_area').addClass('sero');
10		} else {
11			$(this).closest('.item_img_area').removeClass('garo sero');
12		}
13	});
14
15	// 게시판 항목이 하나도 없을 경우 처리
16	$('.board_gallery').each(function() {
17		var gonx = $(this).find('.board_gallery_li').length;
18		if ( gonx < 1 ) {
19			$(this).closest('.board_gallery').addClass('board_no_data').text('등록된 게시글이 없습니다.');
20		}
21	});	
22}
23
24$(function(){
25
26	$('#layerPopup').on('scroll touchmove mousewheel', function(event) {
27		// 터치무브와 마우스휠 스크롤 방지
28		event.preventDefault();
29		event.stopPropagation();
30		return false;
31	})
32})
33
34function openPopupSize( selector, size ) {
35	if ( window.innerWidth < size ) {
36		$(selector).addClass('small_screen');
37		$('#view_iframe').height( document.body.clientHeight - 80 );
38	} else {
39		$('#view_iframe').height( document.body.clientHeight - 126 );
40	}
41}
42
43function openPopup(path){
44	$('body').append('<div id="layerPopup" class="resp_layer_pop gallery_type maxHeight hide"><h4 class="title"></h4><div class="y_scroll_auto"><iframe id="view_iframe" src="'+path+'" scrolling="yes"></iframe></div><a href="javascript:void(0)" class="btn_pop_close" onclick="removeCenterLayer()"></a></div>');
45
46	openPopupSize( '#layerPopup', 1279 );
47	$( window ).on('resize', function() {
48		openPopupSize( '#layerPopup', 1279 );
49	});
50
51	showCenterLayer('#layerPopup');
52}
53
54
55/* responsive table */
56function respTable( table_id_class, modify_screen_width ) {
57	var orizinTableSource = $( table_id_class ).html();
58    if ( $(window).width() < modify_screen_width ) {
59        respTableExe( table_id_class );
60    }
61    $( window ).on('resize', function() {
62        if ( $(window).width() < modify_screen_width ) {
63            respTableExe( table_id_class );
64        } else {
65            $( table_id_class ).html( orizinTableSource );
66        }
67    });
68}
69function respTableExe( gon ) {
70    var newTr = '<tr></tr>';
71    $(gon + ' th').each(function() {
72        $(gon).prepend(newTr);
73    });
74    $(gon + ' th').each(function(i) {
75        $(gon + '>tbody>tr').eq(i).append( $(gon + ' th').eq(i).removeAttr('colspan') ).append( $(gon + ' td').eq(i).removeAttr('colspan') );
76    });
77    $(gon +' tr').filter(':not(:has(th))').remove();
78    $(gon + ' colgroup>col').filter(':not(:eq(0), :eq(1))').remove();
79}
80/* //responsive table */
81
82/* responsive layer popup - center align */
83function showCenterLayer( selector, option1 ) {
84	if ( option1 == 'brother' ) {
85		var gon = $(selector).parent().find('.resp_layer_pop');
86	} else {
87		var gon = $(selector);
88	}
89
90	if ( gon.length < 1 )  return false;
91	/*
92	var popContentScrollHeight = document.body.clientHeight - 60;
93	var gon_bg = $('<div class="resp_layer_bg"></div>');
94
95	gon.find('.y_scroll_auto').css( 'max-height', popContentScrollHeight + 'px' );
96	gon.find('.y_scroll_auto2').css( 'max-height', (popContentScrollHeight - 63) + 'px' );
97
98	if ( gon.hasClass('maxHeight') && window.innerWidth > 767 ) {
99		gon.find('.y_scroll_auto').css( 'max-height', (popContentScrollHeight - 40) + 'px' );
100		gon.find('.y_scroll_auto').css( 'min-height', (popContentScrollHeight - 40) + 'px' );
101	} else if ( window.innerWidth > 767 ) {
102		gon.find('.y_scroll_auto2').css( 'max-height', (popContentScrollHeight - 83) + 'px' );
103	}
104	*/
105	var popContentScrollHeight = document.body.clientHeight - 80;
106	var gon_bg = $('<div class="resp_layer_bg"></div>');
107
108	gon.find('.y_scroll_auto').css( 'max-height', popContentScrollHeight + 'px' );
109	gon.find('.y_scroll_auto2').css( 'max-height', (popContentScrollHeight - 63) + 'px' );
110
111	if ( gon.hasClass('maxHeight') && window.innerWidth > 767 ) {
112		gon.find('.y_scroll_auto').css( 'max-height', (popContentScrollHeight - 40) + 'px' );
113		gon.find('.y_scroll_auto').css( 'min-height', (popContentScrollHeight - 40) + 'px' );
114	} else if ( window.innerWidth > 767 ) {
115		gon.find('.y_scroll_auto2').css( 'max-height', (popContentScrollHeight - 83) + 'px' );
116	}
117
118	if ( window.innerWidth > 767 ) {
119		gon.css({
120			'top': '50%',
121			'left': '50%',
122			'marginLeft': (gon.outerWidth() / 2) * -1,
123			'marginTop': (gon.outerHeight() / 2) * -1
124		});
125	} else {
126		gon.addClass('small_screen');
127	}
128	$( window ).on('resize', function() {
129		if ( window.innerWidth > 767 ) {
130			gon.removeClass('small_screen');
131			gon.css({
132				'top': '50%',
133				'left': '50%',
134				'marginLeft': (gon.outerWidth() / 2) * -1,
135				'marginTop': (gon.outerHeight() / 2) * -1
136			});
137		} else {
138			gon.addClass('small_screen');
139		}
140	});
141	if ( $('.resp_layer_bg').length < 1 ) {
142		$('body').append( gon_bg );
143	} else if ( option1 != 'inner_layer' ) {
144		$('.resp_layer_pop:not(' + selector + ')').addClass('wait_hide');
145	}
146	
147	// Hide 클래스 대소문자 미구분으로 인한 display:none !important 속성 제거
148	if(gon.hasClass('hide')) { gon.removeClass('hide'); }
149	gon.show();
150	$('body').css('overflow', 'hidden');
151	return false;
152}
153
154function hideCenterLayer( selector, option1 ) {
155	if ( selector ) {
156		var gon = $(selector);
157		gon.hide();
158	} else {
159		$('.resp_layer_pop').hide();
160	}
161	if ( option1 != 'inner_layer' ) {
162		$('.resp_layer_bg').remove();
163		$('body').css('overflow', 'auto');
164	}
165}
166
167function removeCenterLayer( selector ) {
168	var res_layer_num = $('.resp_layer_pop:visible').length;
169	if ( res_layer_num > 1 ) {
170		$('.resp_layer_pop').removeClass('wait_hide');
171	} else {
172		$('.resp_layer_bg').remove();
173		$('body').css('overflow', 'auto');
174	}
175	if ( selector ) {
176		$(selector).remove();
177	} else {
178		$('.resp_layer_pop').remove();
179	}
180}
181
182
183function showModal( id ) {
184	var gon_bg = $('<div class="resp_layer_bg"></div>');
185	if ( id ) gon_bg.attr( 'id', id );
186	if ( $('.resp_layer_bg').length < 1 ) {
187		$('body').append( gon_bg );
188	}
189	$('body').css('overflow', 'hidden');
190	return false;
191}
192function hideModal() {
193	$('.resp_layer_bg').remove();
194    /*$('body').css('overflow', 'auto');*/
195    $('body').css('overflow', 'unset');
196}
197/* //responsive layer popup - center align */
198
199/* checkbox, radiobox UI */
200function radioCheckUI() {
201	$('input[type=radio]:checked').parent('label').addClass('on');
202	$('input[type=radio]').on('change', function() {
203		if ( $(this).prop('checked') ) {
204			$(this).parent('label').siblings('label').removeClass('on');
205			$(this).parent('label').addClass('on');
206		}
207	});
208}
209/* //checkbox, radiobox UI */
210
211/* 상품이미지 썸네일 변경 */
212function goodsThumbModify( selector, before, after ) {
213	$( selector + ' img').each(function() {
214		var gon = $(this).attr('src');
215		$(this).attr( 'src', gon.replace( before, after) );
216	});
217}
218/* //상품이미지 썸네일 변경 */

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.