Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $('a').on('click', function(){
- var anchor = $(this);
- event.preventDefault();
- console.log($(anchor.attr('href')).offset().top)
- $('html, body').stop().animate({
- scrollTop: $(anchor.attr('href')).offset().top
- }, 500, 'linear');
- });
- });
Add Comment
Please, Sign In to add comment