Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('a[href^="#"]').on('click', function(event) {
- var target = $( $(this).attr('href') );
- if( target.length ) {
- event.preventDefault();
- $('html, body').animate({
- scrollTop: target.offset().top
- }, 1000);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement