From bd52b3607036ca3c9b8f0eaf9437c0830c40c2d8 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 8 Aug 2013 18:21:01 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=EB=B7=B0=20?= =?UTF-8?q?=ED=83=80=EC=9E=85=20=EB=B3=80=EA=B2=BD=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EC=BD=94=EB=93=9C=20=EA=B0=84=EC=86=8C?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/list.sub2.php | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/shop/list.sub2.php b/shop/list.sub2.php index 99c3a3bcb..1bed5d18e 100644 --- a/shop/list.sub2.php +++ b/shop/list.sub2.php @@ -17,6 +17,8 @@ $.fn.listType = function(type) } }); + $("button.sct_lst_view span").removeClass("sct_lst_on").html(""); + if(type == "gallery") { this.removeClass("sct_40"); $el.each(function() { @@ -45,38 +47,11 @@ if(itemlist_type = get_cookie("ck_itemlist_type")) { $(function() { $("button.sct_lst_view").on("click", function() { - var $el = $("ul.sct").find("li.sct_li"); - var count = $el.size(); - if(count < 1) - return false; - - $el.each(function() { - var st = $(this).attr("style"); - if(st) { - $(this).data("style", st); - } - }); - if($(this).hasClass("sct_lst_gallery")) { - $("ul.sct").removeClass("sct_40"); - $el.each(function() { - if($(this).data("style")) { - $(this).attr("style", $(this).data("style")); - } - }); - set_cookie("ck_itemlist_type", "gallery", 1, g4_cookie_domain); + $("ul.sct").listType("gallery"); } else { - $("ul.sct").addClass("sct_40"); - $el.each(function() { - if($(this).data("style")) { - $(this).attr("style", ""); - } - }); - set_cookie("ck_itemlist_type", "list", 1, g4_cookie_domain); + $("ul.sct").listType("list"); } - - $("button.sct_lst_view span").removeClass("sct_lst_on").html(""); - $(this).children("span").addClass("sct_lst_on").html("활성"); }); }); \ No newline at end of file