Skip to content

Instantly share code, notes, and snippets.

@nsfmc
Created March 23, 2012 17:38
Show Gist options
  • Save nsfmc/2173090 to your computer and use it in GitHub Desktop.
Save nsfmc/2173090 to your computer and use it in GitHub Desktop.
$(function(){
$(".project_list a").click(
function(evt){
evt.preventDefault();
var dest = $(this).attr("href"); // the link destination
$('html,body').animate({scrollTop: $(dest).offset().top},'slow',
function(){window.location.hash = dest} // change the window hash
);
}
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment