1/** 2 * ìì§ì´ë ë°°ë Jquery Plug-in 3 * @author cafe24 4 */ 5 6(function($){ 7 8 $.fn.floatBanner = function(options) { 9 options = $.extend({}, $.fn.floatBanner.defaults , options); 10 11 return this.each(function() { 12 var aPosition = $(this).position(); 13 var jbOffset = $(this).offset(); 14 var node = this; 15 16 $(window).scroll(function() { 17 var _top = $(document).scrollTop(); 18 _top = (aPosition.top < _top) ? _top : aPosition.top; 19 20 setTimeout(function () { 21 var newinit = $(document).scrollTop(); 22 23 if ( newinit > jbOffset.top ) { 24 _top -= jbOffset.top; 25 var container_height = $("#wrap").height(); 26 var quick_height = $(node).height(); 27 var cul = container_height - quick_height; 28 if(_top > cul){ 29 _top = cul; 30 } 31 }else { 32 _top = 0; 33 } 34 35 $(node).stop().animate({top: _top}, options.animate); 36 }, options.delay); 37 }); 38 }); 39 }; 40 41 $.fn.floatBanner.defaults = { 42 'animate' : 500, 43 'delay' : 500 44 }; 45 46})(jQuery); 47 48/** 49 * 문ì 구ëí ìì 50 */ 51$(document).ready(function(){ 52 $('#banner:visible, #quick:visible').floatBanner(); 53 54 //placeholder 55 $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ 56 var placeholderName = $(this).parents().attr('title'); 57 $(this).attr("placeholder", placeholderName); 58 }); 59 /* placeholder ie8, ie9 */ 60 $.fn.extend({ 61 placeholder : function() { 62 //IE 8 ë²ì ìë hasPlaceholderSupport() ê°ì´ false를 ë¦¬í´ 63 if (hasPlaceholderSupport() === true) { 64 return this; 65 } 66 //hasPlaceholderSupport() ê°ì´ false ì¼ ê²½ì° ìë ì½ë를 ì¤í 67 return this.each(function(){ 68 var findThis = $(this); 69 var sPlaceholder = findThis.attr('placeholder'); 70 if ( ! sPlaceholder) { 71 return; 72 } 73 findThis.wrap('<label class="ePlaceholder" />'); 74 var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : ''; 75 findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>'); 76 this.onpropertychange = function(e){ 77 e = event || e; 78 if (e.propertyName == 'value') { 79 $(this).trigger('focusout'); 80 } 81 }; 82 //ê³µíµ class 83 var agent = navigator.userAgent.toLowerCase(); 84 if (agent.indexOf("msie") != -1) { 85 $(".ePlaceholder").css({"position":"relative"}); 86 $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 87 $(".ePlaceholder label").css({"padding":"0"}); 88 } 89 }); 90 } 91 }); 92 93 $(':input[placeholder]').placeholder(); //placeholder() í¨ì를 í¸ì¶ 94 95 //í´ë¦íë©´ placeholder ì¨ê¹ 96 $('body').delegate('.ePlaceholder span', 'click', function(){ 97 $(this).hide(); 98 }); 99 100 //inputì°½ í¬ì»¤ì¤ ì¸ ì¼ë placeholder ì¨ê¹ 101 $('body').delegate('.ePlaceholder :input', 'focusin', function(){ 102 $(this).prev('span').hide(); 103 }); 104 105 //inputì°½ í¬ì»¤ì¤ ìì ì¼ë value ê° true ì´ë©´ ì¨ê¹, false ì´ë©´ ë³´ì¬ì§ 106 $('body').delegate('.ePlaceholder :input', 'focusout', function(){ 107 if (this.value) { 108 $(this).prev('span').hide(); 109 } else { 110 $(this).prev('span').show(); 111 } 112 }); 113 114 //inputì placeholderê° ì§ìì´ ëë©´ true를 ìëë©´ false를 리í´ê°ì¼ë¡ ëì ¸ì¤ 115 function hasPlaceholderSupport() { 116 if ('placeholder' in document.createElement('input')) { 117 return true; 118 } else { 119 return false;
120 } 121 } 122}); 123 124/** 125 * ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 126 */ 127$(window).load(function() { 128 $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ 129 var $img = new Image(); 130 $img.onerror = function () { 131 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 132 } 133 $img.src = this.src; 134 }); 135}); 136 137/** 138 * tooltip 139 */ 140$('.eTooltip').each(function(i){ 141 $(this).find('.btnClose').attr('tabIndex','-1'); 142}); 143//tooltip input focus 144$('.eTooltip').find('input').focus(function() { 145 var targetName = returnTagetName(this); 146 targetName.siblings('.ec-base-tooltip').show(); 147}); 148$('.eTooltip').find('input').focusout(function() { 149 var targetName = returnTagetName(this); 150 targetName.siblings('.ec-base-tooltip').hide(); 151}); 152function returnTagetName(_this){ 153 var ePlacename = $(_this).parent().attr("class"); 154 var targetName; 155 if(ePlacename == "ePlaceholder"){ //ePlaceholder ëì 156 targetName = $(_this).parents(); 157 }else{ 158 targetName = $(_this); 159 } 160 return targetName; 161} 162 163/** 164 * eTab 165 */ 166 $("body").delegate(".eTab a", "click", function(e){ 167 // í´ë¦í li ì selected í´ëì¤ ì¶ê°, 기존 liì ìë selected í´ëì¤ë ìì . 168 var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"), 169 _target = $(this).attr("href"), 170 _siblings = $(_target).attr("class"), 171 _arr = _siblings.split(" "), 172 _classSiblings = "."+_arr[0]; 173 174 //í´ë¦í íì í´ë¹íë ììë íì±í, 기존 ììë ë¹íì±í í¨. 175 $(_target).show().siblings(_classSiblings).hide(); 176 177 178 //preventDefault ë a íê·¸ ì²ë¼ í´ë¦ ì´ë²¤í¸ ì¸ì ë³ëì ë¸ë¼ì°ì íëì ë§ê¸° ìí´ ì¬ì©ë¨. 179 e.preventDefault(); 180}); 181 182 183 184//window popup script 185function winPop(url) { 186 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 187} 188/** 189 * document.location.href split 190 * return array Param 191 */ 192function getQueryString(sKey) 193{ 194 var sQueryString = document.location.search.substring(1); 195 var aParam = {}; 196 197 if (sQueryString) { 198 var aFields = sQueryString.split("&"); 199 var aField = []; 200 for (var i=0; i<aFields.length; i++) { 201 aField = aFields[i].split('='); 202 aParam[aField[0]] = aField[1]; 203 } 204 } 205 206 aParam.page = aParam.page ? aParam.page : 1; 207 return sKey ? aParam[sKey] : aParam; 208}; 209 210$(document).ready(function(){ 211 // tab 212 $.eTab = function(ul){ 213 $(ul).find('a').click(function(){ 214 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 215 _target = $(this).attr('href'), 216 _siblings = '.' + $(_target).attr('class'); 217 $(_target).show().siblings(_siblings).hide(); 218 return false 219 }); 220 } 221 if ( window.call_eTab ) { 222 call_eTab(); 223 }; 224}); 225(function($){ 226$.fn.extend({ 227 center: function() { 228 this.each(function() { 229 var 230 $this = $(this), 231 $w = $(window); 232 $this.css({ 233 position: "absolute", 234 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 235 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 236 }); 237 }); 238 return this; 239 } 240}); 241$(function() { 242 var $container = function(){/* 243<div id="modalContainer"> 244 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 245</div>'); 246*/}.toString().slice(14,-3); 247 $('body') 248 .append($('<div id="modalBackpanel"></div>')) 249 .append($($container)); 250 function closeModal () { 251 $('#modalContainer').hide(); 252 $('#modalBackpanel').hide(); 253 } 254 $('#modalBackpanel').click(closeModal); 255 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 256 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 257 $('#modalContent').attr('src', $url); 258 $('#modalContent').bind("load",function(){ 259 $(".header .close",this.contentWindow.document.body).bind("click", closeModal); 260 }); 261 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 262 $('#modalContainer').center().show(); 263 } 264}); 265})(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.