Thanks for the reply..
You're right about the cookie..my idea was initially for it to have no cookie or cookie reference when the page loads but when the user clicks it creates a cookie to remember the state..
I just couldn't get my head round on how to do it..
Putting in the code you suggested done the trick..full code here
[code]
$(document).ready(function(){
var $widget2=$(".widget2");
$widget2.toggle(readCookie('widget2') !== 'close');
//readCookie('widget2')==='open'? $widget2.show(): $widget2.hide();
$(".box2").toggle(function(){
$(this).next(".widget2").slideDown(200);
setCookie('widget2','open', 1);
}, function(){
$(this).next(".widget2").slideUp(200);
setCookie('widget2','close', 1);
});
});
[/code]
Just one more sneaky question...try inverting my actions, is that just a simple way swapping the open/close around in the code above?
Also I think my toggle is firing when the page loads because I have to press the anchor (.box2) twice for it to close/open after the page has initially loaded..
Thanks for your help..