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

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -