Don\'t know how to put the question title correctly! I have a div that is displayed by button click. The problem is that if user goes to next page(by clicking another button
Using @DustinPoissant's answer, I've made something a little bit easier.
You can use the selector :target to style the element, and save you some code.
:target
Like this:
something
The :target selector will match when the 'hash' on your address matches the id of that element.