/** * 카테고리 마우스 오버 이미지 * 카테고리 서브 메뉴 출력 */ $(document).ready(function(){ var methods = { aCategory : [], aSubCategory : {}, get: function() { $.ajax({ url : '/exec/front/Product/SubCategory', dataType: 'json', success: function(aData) { if (aData == null || aData == 'undefined') return; for (var i=0; i'); $(methods.aSubCategory[iCateNo]).each(function() { aHtml.push('
  • '+this.name+'
  • '); }); aHtml.push(''); var offset = $(overNode).offset(); $('
    ') .appendTo(overNode) .html(aHtml.join('')) .find('li').mouseover(function(e) { $(this).addClass('over'); }).mouseout(function(e) { $(this).removeClass('over'); }); }, close: function() { //$('.sub-category').remove(); } }; methods.get(); $('.xans-layout-category li').mouseenter(function(e) { var $this = $(this).addClass('on'), iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no')); if (!iCateNo) { iCateNo = Number(methods.getParamSeo($this.find('a').attr('href'))); } if (!iCateNo) { return; } methods.show($this, iCateNo); }).mouseleave(function(e) { $(this).removeClass('on'); methods.close(); }); }); /** * 카테고리 마우스 오버 이미지 * 카테고리 서브 메뉴 출력 */ $(document).ready(function(){ var methods = { aCategory : [], aSubCategory : {}, get: function() { $.ajax({ url : '/exec/front/Product/SubCategory', dataType: 'json', success: function(aData) { if (aData == null || aData == 'undefined') return; for (var i=0; i'); $(methods.aSubCategory[iCateNo]).each(function() { aHtml.push('
  • '+this.name+'
  • '); }); aHtml.push(''); var offset = $(overNode).offset(); $('li.first_'+iCateNo) .append(aHtml.join('')) .find('li').mouseover(function(e) { $(this).addClass('over'); }).mouseout(function(e) { $(this).removeClass('over'); }); }, close: function() { $('ul.child_ul').remove(); } }; methods.get(); $('div.all-cate, div.allcate-wrap').mouseenter(function(e) { var iCateNo = 0; var nowCnt = 0; var bigCnt = 0; for(var i =0; i < methods.aSubCategory[1].length ; i++) { iCateNo = methods.aSubCategory[1][i].cate_no; if(methods.aSubCategory[iCateNo] != undefined) { nowCnt = methods.aSubCategory[iCateNo].length; } if(bigCnt < nowCnt) bigCnt = nowCnt; } for(var i =0; i < methods.aSubCategory[1].length ; i++) { methods.show('', methods.aSubCategory[1][i].cate_no, bigCnt); } }).mouseleave(function(e) { $('ul.child_ul').remove(); methods.close(); }); }); /** * 움직이는 배너 Jquery Plug-in * @author cafe24 */ (function($){ $.fn.floatBanner = function(options) { options = $.extend({}, $.fn.floatBanner.defaults , options); return this.each(function() { var aPosition = $(this).position(); var jbOffset = $(this).offset(); var node = this; $(window).scroll(function() { var _top = $(document).scrollTop(); _top = (aPosition.top < _top) ? _top : aPosition.top; setTimeout(function () { var newinit = $(document).scrollTop(); if ( newinit > jbOffset.top ) { _top -= jbOffset.top; var container_height = $("#wrap").height(); var quick_height = $(node).height(); var cul = container_height - quick_height; if(_top > cul){ _top = cul; } }else { _top = 0; } $(node).stop().animate({top: _top}, options.animate); }, options.delay); }); }); }; $.fn.floatBanner.defaults = { 'animate' : 500, 'delay' : 300 }; })(jQuery); /** * 문서 구동후 시작 */ $(document).ready(function(){ $('#banner:visible, #quick:visible').floatBanner(); //placeholder $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ var placeholderName = $(this).parents().attr('title'); $(this).attr("placeholder", placeholderName); }); /* placeholder ie8, ie9 */ $.fn.extend({ placeholder : function() { //IE 8 버전에는 hasPlaceholderSupport() 값이 false를 리턴 if (hasPlaceholderSupport() === true) { return this; } //hasPlaceholderSupport() 값이 false 일 경우 아래 코드를 실행 return this.each(function(){ var findThis = $(this); var sPlaceholder = findThis.attr('placeholder'); if ( ! sPlaceholder) { return; } findThis.wrap('