Results 1 to 5 of 5
Apr 4, 2011, 09:55 #1
- Join Date
- Jun 2007
- 168 Post(s)
- 8 Thread(s)
Fire a JavaSript event when user moves from one div to another using address bar
I have a page divided into various divs, each with an unique id.
The user can navigate through these divs using a nav bar at the top of the screen, which is pinned in position with 'position:fixed'.
I have attached an event handler to the links in the nav bar. Correspondingly when the user uses the nav bar to move around the page the desired event always fires.
However, if the user uses the address bar to navigate nothing happens, e.g. if someone is viewing "www.mysite.com/#panel1" and then types into the address bar "www.mysite.com/#panel2", they are moved to the corresponding section of the site, but no event fires.
Is there any way to achieve this?
Thanks in advance.