Jump to an anchor link on function complete in jQuery?
Posted
by nick92675
on Stack Overflow
See other posts from Stack Overflow
or by nick92675
Published on 2010-04-22T16:24:16Z
Indexed on
2010/04/22
16:33 UTC
Read the original article
Hit count: 130
jQuery
|JavaScript
I have a simple slidetoggle function that opens onclick. What I'd like to do is jump the user down to the bottom of the page following the opened div. Basically, wait for the slidetoggle to complete - then imagine clicking my jump link to pull the viewport down. Here's my code.
$('#clickme').click(function() {
$('#form-area').slideToggle('slow', function() {
// Animation complete
// what can i put here that's like my standard jumpto?
});
});
<a href="#form-bottom" id="clickme">Click here</a>
<div class="main" id="form-area" >
Stuff
</div>
<a name="form-bottom"></a>
© Stack Overflow or respective owner