From 910ef67bc6b143cfd2f7e4fe0679fa1aec09e42c Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 9 Aug 2013 11:14:54 +0900 Subject: [PATCH] =?UTF-8?q?#275=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=ED=83=80?= =?UTF-8?q?=EC=9D=B4=20=EB=B3=80=EA=B2=BD=EC=8B=9C=20=EA=B8=B0=EC=A1=B4=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=A0=9C=EA=B1=B0=20=EB=B0=8F=20?= =?UTF-8?q?=EB=B3=B5=EA=B5=AC=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/list.sub2.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/shop/list.sub2.php b/shop/list.sub2.php index ca7ff804d..c1359ee95 100644 --- a/shop/list.sub2.php +++ b/shop/list.sub2.php @@ -10,17 +10,29 @@ $.fn.listType = function(type) if(count < 1) return; + // class 있다면 저장 + var cl = this.attr("class"); + if(cl && !this.data("class")) { + this.data("class", cl); + } + + // 각 element의 inline 스타일 저장 $el.each(function() { var st = $(this).attr("style"); - if(st) { + if(st && !$(this).data("style")) { $(this).data("style", st); } }); + // 버튼의 class on class 제거 $("button.sct_lst_view span").removeClass("sct_lst_on").html(""); if(type == "gallery") { - this.removeClass("sct_40"); + this.removeClass("sct sct_40"); + if(this.data("class")) { + this.attr("class", this.data("class")); + } + $el.each(function() { if($(this).data("style")) { $(this).attr("style", $(this).data("style")); @@ -29,7 +41,11 @@ $.fn.listType = function(type) $("button.sct_lst_gallery span").addClass("sct_lst_on").html(" 선택됨"); } else { - this.addClass("sct_40"); + if(this.data("class")) { + this.removeAttr("class"); + } + this.addClass("sct sct_40"); + $el.each(function() { if($(this).data("style")) { $(this).removeAttr("style");