This is called a hashchange event. You can change the value after #! without reloading the page, then you can use AJAX to load the necessary information. If you are using a new browser that supports HTML5, you can use History.pushState to change the url string in the same way.
Basically, you add an event to the links, change the URL (using location.hash or pushState ), and then you can load the data via AJAX.
Here is a decent example of location.hash , and here is one for pushState .
For a good cross-browser solution, I suggest History.js .
If you want to use History.js by adding scripts to your page, you also need to add some JavaScript.
$('a.hash').click(function(e){
source share