Forcing a reload in JQuery
I am making use of the Lavalamp plugin from http://nixboxdesigns.com/projects/jquery-lavalamp/ and everything seems to be working fine except that there is a little quirk when using the back button.
For example:
- If you are starting off from the home page, the hover is underneath the home menu.
- Click on a new menu item, the hover appears underneath it
- Click on the browser's back button, and the hover does not return to the home menu item, it stays at the previously clicked one.
I need to find a way to call the Lavalamp function when the back button is being triggered.
Hope to get some help 开发者_StackOverflow中文版here
It sounds like the OnBeforeUnload event is what you are looking for.
精彩评论