Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Smooth Scrolling with Sticky Menu
- $('a').click(function(e) {
- var target = $(this).attr('href');
- e.preventDefault();
- $('html,body').animate({
- scrollTop: $(target).offset().top
- }, 800, 'easeInOutCirc');
- });
- $('html').animate({ // $(document.documentElement) works too
- scrollTop: Math.max($(target).offset().top - $('#your-header').outerHeight(), 0)
- }, 800, 'easeInOutCirc');
Add Comment
Please, Sign In to add comment