텍스트 리사이즈를 페이지 바뀌어도 유지되도록 수정
This commit is contained in:
25
js/common.js
25
js/common.js
@ -526,6 +526,9 @@ function font_resize(id, act)
|
|||||||
{
|
{
|
||||||
var $elements = $("#"+id+" *");
|
var $elements = $("#"+id+" *");
|
||||||
$elements.removeClass("applied");
|
$elements.removeClass("applied");
|
||||||
|
var count = parseInt(get_cookie("ck_font_resize_count"));
|
||||||
|
if(isNaN(count))
|
||||||
|
count = 0;
|
||||||
|
|
||||||
$elements.each(function() {
|
$elements.each(function() {
|
||||||
if($(this).hasClass("no_text_resize"))
|
if($(this).hasClass("no_text_resize"))
|
||||||
@ -552,6 +555,28 @@ function font_resize(id, act)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 텍스트 리사이즈 회수 쿠키에 기록
|
||||||
|
if(act == "increase")
|
||||||
|
count++;
|
||||||
|
else
|
||||||
|
count--;
|
||||||
|
|
||||||
|
set_cookie("ck_font_resize_count", count, 1, g4_cookie_domain);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* font_resize 함수를 반복 할 때 사용
|
||||||
|
**/
|
||||||
|
function font_resize2(id, act, loop)
|
||||||
|
{
|
||||||
|
// fotn resize 카운트 초기화
|
||||||
|
set_cookie("ck_font_resize_count", 0, 1, g4_cookie_domain);
|
||||||
|
|
||||||
|
for(i=0; i<loop; i++) {
|
||||||
|
font_resize(id, act);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
tail.sub.php
13
tail.sub.php
@ -93,6 +93,19 @@ $(function(){
|
|||||||
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
|
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 텍스트 리사이즈 카운트 쿠키있으면 실행
|
||||||
|
var resize_act;
|
||||||
|
var text_resize_count = parseInt(get_cookie("ck_font_resize_count"));
|
||||||
|
if(!isNaN(text_resize_count)) {
|
||||||
|
if(text_resize_count > 0)
|
||||||
|
resize_act = "increase";
|
||||||
|
else if(text_resize_count < 0)
|
||||||
|
resize_act = "decrease";
|
||||||
|
|
||||||
|
if(Math.abs(text_resize_count) > 0)
|
||||||
|
font_resize2("container", resize_act, Math.abs(text_resize_count));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function menu_rearrange(el)
|
function menu_rearrange(el)
|
||||||
|
|||||||
Reference in New Issue
Block a user