JQuery hide/show with cookies

$('a.show').hide();

$('a.hide').click(function(){
$('h2.title,.view-header-latest').add(this).hide();
$('a.show').show();
$.cookie('hideShow', 'hide');
return false;
});

var hideShow = $.cookie('hideShow');
if (hideShow=='hide') {
$('a.hide,h2.title,.view-header-latest').hide();
$('a.show').show();
};

$('a.show').click(function(){
$(this).hide();
$('a.hide,h2.title,.view-header-latest').show();
$.cookie('hideShow', 'show');
return false;
});

if (hideShow=='show') {
$('h2.title,.view-header-latest').show();
};


Оставить комментарий

Содержание этого поля является приватным и не предназначено к показу. Если есть аккаунт Gravatar, то отображается глобальный аватар.

Подробнее о форматировании

КАПЧА
А ты не робот? Введи 5 цифр
                                                              
ad88888ba ad88888ba ,d8 88 88
d8" "8b d8" "88 ,d888 ,d88 ,d88
Y8a a8P 8P 88 ,d8" 88 888888 888888
"Y8aaa8P" Y8, ,d88 ,d8" 88 88 88
,d8"""8b, "PPPPPP"88 ,d8" 88 88 88
d8" "8b 8P 8888888888888 88 88
Y8a a8P 8b, a8P 88 88 88
"Y88888P" `"Y8888P' 88 88 88

Enter the code depicted in ASCII art style.
To prevent automated spam submissions leave this field empty.