상품보기 유형 변경 코드를 파일에 분리해서 저장

This commit is contained in:
chicpro committed 2013-08-08 14:25:58 +09:00
1 parent 21e5ac6108
commit 0da7ccb589
7 files changed
+71 -62

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script>
// 리스트 타입 쿠키가 있을 경우 바로 적용
if(itemlist_type = get_cookie("ck_itemlist_type")) {
if(itemlist_type == "gallery") {
$("ul.sct").removeClass("sct_13");
set_cookie("ck_itemlist_type", "gallery", 1, g4_cookie_domain);
} else {
$("ul.sct").addClass("sct_13");
set_cookie("ck_itemlist_type", "list", 1, g4_cookie_domain);
}
}
$(function() {
$("button.sct_lst_view").on("click", function() {
if($(this).hasClass("sct_lst_gallery")) {
$("ul.sct").removeClass("sct_13");
set_cookie("ck_itemlist_type", "gallery", 1, g4_cookie_domain);
} else {
$("ul.sct").addClass("sct_13");
set_cookie("ck_itemlist_type", "list", 1, g4_cookie_domain);
}
});
});
</script>