javascript - Use the browser back button with pages loaded by Ajax? -
$(document).ready(function () { $('#gnav a').click(function (e) { e.preventdefault(); $('#contents').load(this.hash.substr(1) +'.php') }); }); that jquery code loads content div via ajax. how can make use of browser button code?
thanks!
you use html5 history apis described @ http://diveintohtml5.ep.io/history.html -- gives complete control of back/forward behaviour internal navigation.
Comments
Post a Comment