Skip to content

Commit 6fbb65e

Browse files
author
Chris Ferdinandi
committed
Updated docs
1 parent 7b35bc4 commit 6fbb65e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,20 @@ smoothScroll.animateScroll(
125125
);
126126
```
127127

128+
**Example 1**
129+
130+
```javascript
131+
smoothScroll.animateScroll( null, '#bazinga' );
132+
```
133+
134+
**Example 2**
135+
136+
```javascript
137+
var toggle = document.querySelector('#toggle');
138+
var options = { speed: 1000, easing: 'easeOutCubic' };
139+
smoothScroll.animateScroll( toggle, '#bazinga', options );
140+
```
141+
128142
### Fixed Headers
129143

130144
Add a `[data-scroll-header]` data attribute to fixed headers. Smooth Scroll will automatically offset scroll distances by the header height. If you have multiple fixed headers, add `[data-scroll-header]` to the last one in the markup.

0 commit comments

Comments
 (0)