I’m trying to do the following – Once I click the a href the form-container slides down, no issue there. I’m also trying to have the page scroll down to the bottom (smooth, animated scrolling) so the content is viewable during the slide down.
My attempt:
<a class="enter" id=slide href="#bottom"></a>
<div class="form-container">
</div>
<script type="text/javascript">
$("#slide").click(function () {
$('.form-container').slideToggle();
});
$("a[href='#bottom']").click(function() {
$('html, body').animate({
scrollTop: $(document).height()-$(window).height()},
1400,
"easeOutQuint"
);
});
</script>
use this