Skip to content

Instantly share code, notes, and snippets.

@lightsuner
Created April 5, 2014 09:44
Show Gist options
  • Save lightsuner/9989728 to your computer and use it in GitHub Desktop.
Save lightsuner/9989728 to your computer and use it in GitHub Desktop.
$('body').on('activate.bs.scrollspy', function(e) {
var hash = $(e.target).find('a').attr('href');
if(history.pushState) {
history.pushState({}, "", hash);
} else {
// Uncomment this for ie8 or ie9
//window.location.hash = hash;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment