Here is my Jquery:
$("#tool").click(function() {
$(".chelp").slideToggle();
$("wrapper").animate({ opacity: 1.0 },200).slideToggle(200, function() {
$("#tool img").toggle();
});
});
When you click #tool img
#wrapper
is hidden along with .chelp
.
I need to control this with a cookie, so when the user hides #wrapper it remains hidden on all pages or when they re-visit the page.
I know there is a jQuery Cookie plugin, but I'd like to do this with plain Javascript rather then including another plugin.
Can anyone tell me how i can build in it in plain javascript and merge with the JQuery to create a cookie, then check the cookie each time the page loads to see if #wrapper should be hidden or displayed?