/ Published in: JavaScript
Expand |
Embed | Plain Text
<script> $(function(){ $(".jump").on("click", function(e){ e.preventDefault(); to = $(this).attr("rel"); target = $($(this).attr("href")).offset(); $('html,body').animate({scrollTop: target.top}, 1000); }); }); </script> <!-- class jump activates it as a jump link, rel contains id of area to jump to --> <a href="#eol" class="jump" rel="eol">Home</a>
You need to login to post a comment.
