You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,13 +153,13 @@ var scroll = new SmoothScroll('a[href*="#"]', {
153
153
154
154
155
155
156
-
## Options and Settings
156
+
## API
157
157
158
158
Smooth Scroll includes smart defaults and works right out of the box. But if you want to customize things, it also has a robust API that provides multiple ways for you to adjust the default options and settings.
159
159
160
-
### Global Settings
160
+
### Options and Settings
161
161
162
-
You can pass options and callbacks into Smooth Scroll through the `init()` function:
162
+
You can pass options and callbacks into Smooth Scroll when instantiating.
You can also call Smooth Scroll's methods in your own scripts.
249
+
Smooth Scroll also exposes several public methods.
250
250
251
251
#### animateScroll()
252
252
Animate scrolling to an anchor.
@@ -297,15 +297,15 @@ scroll.cancelScroll();
297
297
***Note:****This does not handle focus management. The user will stop in place, and focus will remain on the anchor link that triggered the scroll.*
298
298
299
299
#### init()
300
-
Initialize Smooth Scroll. This is called automatically when you setup your `new SmoothScroll` object, but can be used to reinitialize your instance.
300
+
Initialize Smooth Scroll. This is called automatically when you instantiate your `new SmoothScroll` object, but can be used to reinitialize your instance.
301
301
302
302
```javascript
303
303
var scroll =newSmoothScroll();
304
304
scroll.init('.some-selector');
305
305
```
306
306
307
307
#### destroy()
308
-
Destroy the current `smoothScroll.init()`. This is called automatically during the `init`function to remove any existing initializations.
308
+
Destroy the current initialization. This is called automatically in the `init`method to remove any existing initializations.
0 commit comments