I have a simple example of a toggle menu and I want to use a JavaScript cookie to make it persistent.
I am not sure what the logic should be when using this toggle event.
$('.show_menu').on('click', function() {
$('.top_menu_hidden').stop().slideToggle('normal', function(){
// some code here
});
});
A live example on jsfiddle
I’m using the jQuery cookie plugin
Any ideas?
Are you looking for something like this:
http://jsfiddle.net/zR4AV/4/