- Allows for easy implementation of smooth scrolling for same-page links.
- Works like this: $(‘a’).smoothScroll();
- Specify a containing element if you want: $(‘#container a’).smoothScroll();
- Exclude links if they are within a containing element: $(‘#container a’).smoothScroll({excludeWithin: [‘.container2’]});
- Exclude links if they match certain conditions: $(‘a’).smoothScroll({exclude: [‘.rough’,‘#chunky’]});
- Adjust where the scrolling stops: $(‘.backtotop’).smoothScroll({offset: -100});
- Add a callback function that is triggered after the scroll is complete: $(‘a’).smoothScroll({afterScroll: function() { window.location.hash = this.hash; }});
- Add back button support by including a history management plugin such as Ben Alman’s BBQ. See demo/bbq.html for an example of how to implement this.
forked from kswedberg/jquery-smooth-scroll
-
Notifications
You must be signed in to change notification settings - Fork 0
Automatically make same-page links scroll smoothly
License
cse-coder/jquery-smooth-scroll
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Automatically make same-page links scroll smoothly
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- JavaScript 51.9%
- HTML 44.7%
- CSS 2.7%
- Smarty 0.7%