Skip to content

Commit 252e4a5

Browse files
committed
Fix misspelling of autoCoefficient
1 parent d2b1604 commit 252e4a5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

readme.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ The following options, shown with their default values, are available for both `
3737
// `this` is the triggering element
3838
afterScroll: function() {},
3939
easing: 'swing',
40+
41+
// speed can be a number or 'auto'
42+
// if 'auto', the speed will be calculated based on the formula:
43+
// (current scroll position - target scroll position) / autoCoeffic
4044
speed: 400,
4145

42-
// coefficient for "auto" speed
43-
autoCoefficent: 2,
46+
// autoCoefficent: Only used when speed set to "auto".
47+
// The higher this number, the faster the scroll speed
48+
autoCoefficient: 2,
4449

4550
// $.fn.smoothScroll only: whether to prevent the default click action
4651
preventDefault: true

src/jquery.smooth-scroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var version = '1.4.13',
2727
speed: 400,
2828

2929
// coefficient for "auto" speed
30-
autoCoefficent: 2,
30+
autoCoefficient: 2,
3131

3232
// $.fn.smoothScroll only: whether to prevent the default click action
3333
preventDefault: true
@@ -211,7 +211,7 @@ $.smoothScroll = function(options, px) {
211211
}
212212

213213
// Divide the delta by the coefficient
214-
speed = delta / opts.autoCoefficent;
214+
speed = delta / opts.autoCoefficient;
215215
}
216216

217217
aniOpts = {

0 commit comments

Comments
 (0)