I have multiple links that show/hide divs throughout (using slideDown()). Each of the links are
<a href="#">Link</a>
Everytime you click on the link, it jumps back to the top of the screen while it animates. I’m assuming it’s because of the #. Is there any way in jQuery to focus on the animation rather than jump to the top of the screen each time? Thanks
In the onClick handler, disable the default action of the anchor element …
$('a').click(function(e) {
e.preventDefault();
// ANIMATION STUFF GOES HERE...
});