I'm completely new in jquery (and this is my first post
here). I'm using anchors on a website and I am keeping the
#nameoftheanchor after the URL. I'm using this code for a
"To top" animation link:
$(function(){
$.easing.def = "easeOutExpo";
$(window).scroll(function(){
if ($(this).scrollTop() > 100) {
$('.scrollToTop').fadeIn();
} else {
$('.scrollToTop').fadeOut();
}
});
$('.scrollToTop').click(function(){
$('html, body').animate({scrollTop : 0},1000);
return false;
});
});
The thing is, I'd like to get the URL clean of anchors after
clicking on this "To top" link.