Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cafe01/jquery-smooth-scroll
jQuery Smooth Scrolling Anchors Plugin
https://github.com/cafe01/jquery-smooth-scroll
Last synced: about 2 months ago
JSON representation
jQuery Smooth Scrolling Anchors Plugin
- Host: GitHub
- URL: https://github.com/cafe01/jquery-smooth-scroll
- Owner: cafe01
- Created: 2013-06-24T17:46:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-24T20:02:09.000Z (over 11 years ago)
- Last Synced: 2024-10-11T21:08:13.127Z (2 months ago)
- Language: JavaScript
- Size: 99.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
jquery-smooth-scroll
====================jQuery Smooth Scrolling Anchors Plugin
# Usage
Using ``:
...
$(function(){
$('a[href^=#']).smoothScroll({
// example using default options
duration: 600,
easing: 'swing'
});
})Using any element:
Scroll to .foo smoothly.
...
$(function(){
$('h1').smoothScroll();
})# Config Options
* duration - the scroll animation duration
* easing - the scroll animation easing# Config Attributes
You can add config attributes to the clickable elements. (See demo.html)
* data-scroll-duration
* data-scroll-easing
* data-scroll-offset# Todo
* change the browser fragment
* scroll when fragment changes
* scroll on init if fragment exists
* improve doc