Hide a Div As a Session State - after Div is hidden it remains hidden on subsequent pages
Posted on 2010-09-15
I'm new to JS and jQuery.. I have "all" the books and am doing my home work. But some things are still opaque. I will be putting a banner across the tops of all pages on a site for 3 months, I'll bring in this one code chunk using SSI and banners will change, but we want to put a "Hide" button on it so if some user wants to turn it off for the current session, he can. I don't want to store that as a preference in a cookie, but only for the current session.
OK, now, the animate tool in jQuery is quite transparent and the documentation in the jQuery Cookbook, which I have is also very simple. BUT: if I implement this on one page, when the user goes to the next page, the div will appear again. How do I trap the banner state? In effect, make "display:none" "sticky", as the user traverses many pages. I will go and see if I can study up on sessions, but I have a short time frame to get this done and I'm not sure I'll grok everything on time. Any help will be appreciated.