0

I use some jquery scripts like "tooltipster" and some other custom ones I made (like sliding divs when hovering elements).

When these goodies are links (link inside a tooltip or on a sliding div), they do what they are supposed to and lead you to the proper page when clicked. The issue arises when you use the browser back button: you get back to the exact configuration you left before the link redirection: the tooltip is open as it was but it shouldn't as you didn't ask for it/ the sliding div is visible even if you didn't hover the related element. It looks like the back button doesn't reset the jquery event that occurred right before the page redirection.It "thinks" you are hovering the elements when you are not.

So, how can I force a jquery script (or jquery in general) to reset the last event when going back to the previous page with the browser back button?

Note: I want to reset jQuery but not refresh the page content. So, using a random url variable to trick the browser will not help as it will ruin the cache. I can't use url hashes neither as I already use hashes for some other purposes.

Thank you for your help.

Baylock
  • 1,116
  • 4
  • 23
  • 47
  • 1
    http://stackoverflow.com/questions/8166208/jquery-history-back-button-to-reset maybe this could help? – sinisake Feb 11 '14 at 01:02
  • Nice and easy. Thank you very much Nevermind. Despite a vote, what I can I for rewarding such a quick and effective answer as it's just a comment? – Baylock Feb 11 '14 at 01:07
  • no problem... :) Since Shawn actually solved this issue, i didn't posted it as MY answer, so vote for his detailed answer. :) – sinisake Feb 11 '14 at 07:50

0 Answers0