So I use the following code to show and fade an element. I have set the div on visible on the homepage and hidden on all other pages so the div only shows up on the homepage. My
You can use localStorage which would be more right in this case IMO.
$(window).load(function(){ if(typeof localStorage.testlayHidden != 'undefined') { $("#testlay").fadeIn('slow').delay(1000).fadeOut(1600, function() { localStorage.testlayHidden = 1; }); } });