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 цифр
                                                                 
8888888888 ad888888b, 88 ad88888ba 8888888888
88 d8" "88 ,d88 d8" "88 88
88 ____ a8P 888888 8P 88 88 ____
88a8PPPP8b, aad8" 88 Y8, ,d88 88a8PPPP8b,
PP" `8b ""Y8, 88 "PPPPPP"88 PP" `8b
d8 "8b 88 8P d8
Y8a a8P Y8, a88 88 8b, a8P Y8a a8P
"Y88888P" "Y888888P' 88 `"Y8888P' "Y88888P"

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