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
@@ -59,7 +62,7 @@ Structure your HTML like so (default options included)
59
62
*`mode` - (String) Valid options are:
60
63
*`vp` (Viewport) - The sections will be automatically sized to be the same as the viewport
61
64
*`set` - Use the height and width set by CSS (use this for having different heights for different sections)
62
-
*`autoHash` - (Boolean) Whether the auto-hashing feature is enabled
65
+
*`autoHash` - (Boolean) Whether the auto-hashing feature is enabled. If you use this feature, it is important to use EventEmitter as well, otherwise smartscroll will listen to every `scroll` event, which is very resource-draining and can make the animation more 'glitchy'
63
66
*`sectionScroll` - (Boolean) Whether the section-scrolling feature is enabled
64
67
*`initialScroll` - (Boolean) Whether smartscroll should scroll to the position specified by the hash on initial load
65
68
*`keepHistory` - (Boolean) Whether scrolling through different sections will be recorded in the browser's history
@@ -68,6 +71,9 @@ Structure your HTML like so (default options included)
68
71
*`animationSpeed` - (Integer) Time taken for the scroll animation, in miliseconds
69
72
*`headerHash` - (String) The hash for the section above the sections, must be non-empty to reliably ensure the page do not jump when updating the hash value across browsers (as `#` means `_top`)
70
73
*`breakpoint` - (Integer) The width of the browser below which scrolljacking will be disabled
74
+
*`sectionSelector` - (String) The selector applied to each section, overrides `sectionClass` and allow more flexibility in choosing a selector. (Added in 2.1.0)
75
+
*`dynamicHeight` - (Boolean) If you are going to be dynamically adding and removing content so as to change the position and/or size of the section wrappers and/or sections, then set this to true. Set to false otherwise to increase performance.
Copy file name to clipboardExpand all lines: examples/auto-hash/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
<divclass="section" data-hash="a">
13
13
<div>
14
14
<h1>smartscroll - Auto-Hash</h1>
15
-
<p>A tiny (1164b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15
+
<p>A tiny (1378b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
16
16
<p>See it on <ahref="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <ahref="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
<h1>smartscroll - Different Heights & Hybrid Scroll</h1>
14
+
<p>A tiny (1378b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15
+
<p>See it on <ahref="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <ahref="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
Copy file name to clipboardExpand all lines: examples/different-heights/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
<divclass="section" data-hash="a">
13
13
<div>
14
14
<h1>smartscroll - Different Heights</h1>
15
-
<p>A tiny (1164b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15
+
<p>A tiny (1378b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
16
16
<p>See it on <ahref="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <ahref="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
Copy file name to clipboardExpand all lines: examples/hybrid-scroll/index.html
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
<divclass="header">
12
12
<div>
13
13
<h1>smartscroll - Hybrid Scroll</h1>
14
-
<p>A tiny (1164b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
14
+
<p>A tiny (1378b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15
15
<p>See it on <ahref="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <ahref="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
16
16
<p>Try out other examples!</p>
17
17
<ul>
@@ -50,8 +50,7 @@ <h1>Hybrid Scroll</h1>
50
50
</div>
51
51
</div>
52
52
</div>
53
-
54
-
<divclass="header">
53
+
<divclass="footer">
55
54
<div>
56
55
<h1>Footer</h1>
57
56
<p>This section is not inside the section wrapper, so normal scrolling here!</p>
@@ -110,7 +109,6 @@ <h1>Footer</h1>
110
109
<p>This section is not inside the section wrapper, so normal scrolling here!</p>
Copy file name to clipboardExpand all lines: examples/index.html
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
<divclass="header">
12
12
<div>
13
13
<h1>smartscroll</h1>
14
-
<p>A tiny (1164b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
14
+
<p>A tiny (1378b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15
15
<p>See it on <ahref="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <ahref="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
Copy file name to clipboardExpand all lines: examples/keep-history/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
<divclass="section" data-hash="a">
13
13
<div>
14
14
<h1>smartscroll - Keep History</h1>
15
-
<p>A tiny (1164b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15
+
<p>A tiny (1378b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
16
16
<p>See it on <ahref="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <ahref="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
Copy file name to clipboardExpand all lines: examples/permalink/index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
<divclass="section" data-hash="a">
13
13
<div>
14
14
<h1>smartscroll - Permalink</h1>
15
-
<p>A tiny (1164b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15
+
<p>A tiny (1378b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
16
16
<p>See it on <ahref="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <ahref="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
0 commit comments