I'm working on a mobile site that is just a bunch of .html pages in structure.
In the header of the site I have a simple Show/Hide button that uses jquery `toggle()` to show or hide the banner. Works perfectly but when you switch to another page obviously the banner is displayed as it can't tell that on the previous page you chose to "hide" the banner as it's rendering a new .html page.
My initial thought was to fire something like a specific hash tag which could be picked up using JS and indicate that the banner should remain hidden or shown (depending on the hash). I'm just not in love with the hash idea as it is at best an ugly hack.
Any thoughts on how to detect a property of the previous page that I can then use in jquery or js to operate on the banner show/hide property?
以上就是Detect state of object from previous page的详细内容，更多请关注web前端其它相关文章！