How to prevent jQuery from default browser behavior, go to the link, if the link is in the link when the page loads?
var myLink = document.location.toString();
if (myLink.match('#')) {
$('html, body').animate({ scrollTop: 0 }, 0);
$(window).scrollTop();
}
Or .... can't find a solution ... search ... and search
Bobo source
share