remember element value in cookie and display.
I have one collapse menu. In that menu. In this menu I want to next div open when we get current div.
but I got some probe into that. here is my
demo.
and script given below.
$
(
document
)
.
ready
(
function
(
)
{
var widget2 = $(".widget2");
var box2 = $(".box2");
if (getCookie('box2cooki')) {
var id = getCookie('box2cooki');
var Element = $(".box2#id");
alert(Element);
}
else {
alert("hiiiiiii");
}
widget2.hide();
box2.click(function() {
$(this).next(widget2).slideToggle(200);
var box2ID = $(this).attr('id');
setCookie('box2cooki', box2ID);
});
$(".inner").hide();
$(".box").click(function() {
$(this).next(".inner").slideToggle(200);
});
});