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 цифр
                                                                          
ad888888b, ad8888ba, 888888888888 ,d8 888888888888
d8" "88 8P' "Y8 ,8P' ,d888 ,8P'
a8P d8 d8" ,d8" 88 d8"
aad8" 88,dd888bb, ,8P' ,d8" 88 ,8P'
""Y8, 88P' `8b d8" ,d8" 88 d8"
"8b 88 d8 ,8P' 8888888888888 ,8P'
Y8, a88 88a a8P d8" 88 d8"
"Y888888P' "Y88888P" 8P' 88 8P'

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