Change Browser Address Bar Hash Parameter

In the example below we replace the hash parameter, which we get from the clicked link. Useful for adding bookmarking capabilities when using AJAX:
[javascript]
// update browser address bar URL
$(‘a.demo-link’).click(function(){
var hash = $(this).attr(‘href’);
location.hash = hash;
});
[/javascript]

Leave a Reply