0

Possible Duplicate:
On - window.location.hash - change?

When i press the browser back button $(document).ready(function()
does not work?

is there any Jquery Function to fire the $(document).ready(function() when i press the back button?

Community
  • 1
  • 1
KJA
  • 733
  • 3
  • 9
  • 21
  • 1
    Well, it does work. You can check it here on SO: click on any link in the right bar and then back. And everything works as expected. – zerkms Mar 26 '12 at 22:48
  • I tried to put alert inside $(document).ready(function() but nothing work, only the param after # is changed, but its not working – KJA Mar 26 '12 at 22:50
  • http://jsfiddle.net/DZssd/ --- click on the "our blog" link in the left orange block and then press "Back" – zerkms Mar 26 '12 at 22:51
  • changing anchor-part doesn't change the page actually. So DOM stays the same – zerkms Mar 26 '12 at 22:52
  • If you're not loading a new DOM why would the DOM ready event fire again..? – David Thomas Mar 26 '12 at 22:53
  • Yes it is working, but when i go from localhost/member#page2 to localhost/member#page1 from the back button, $(document).ready(function() didn't work – KJA Mar 26 '12 at 22:58
  • Can you post an example somewhere so we can see the behavior and help troubleshoot? – JohnFx Mar 26 '12 at 23:00
  • @Neil Thank you man this is what I need – KJA Mar 27 '12 at 08:13

0 Answers0