1
- # jQuery ScrollWatch 1.3
1
+ # jQuery ScrollWatch
2
2
3
3
jQuery plugin to implement navigation or any other functionality based on current scrolling position of the page or inside a custom element.
4
4
5
- See [ demo.html] ( demo.html ) for an example.
5
+ See ` demo.html ` for an example.
6
6
7
7
## Functionality
8
8
@@ -16,13 +16,7 @@ Tested in Mozilla Firefox, Google Chrome, Safari, Opera and MSIE 7+
16
16
17
17
## Known limitations
18
18
19
- - hash links between different instances are not fully supported (yet)
20
-
21
-
22
-
23
- ----------
24
-
25
-
19
+ - hash links between different instances are not fully supported
26
20
27
21
## Usage
28
22
@@ -98,14 +92,14 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
98
92
<th>Description</th>
99
93
</tr>
100
94
</thead >
101
-
95
+
102
96
<tbody >
103
97
<tr>
104
98
<th>scroller</th>
105
99
<td>window</td>
106
100
<td>Element to watch for scrolling events (must have <code>position: relative or absolute</code> if not window)</td>
107
101
</tr>
108
-
102
+
109
103
<tr>
110
104
<th>resolutionMode</th>
111
105
<td>0</td>
@@ -120,11 +114,11 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
120
114
</ul>
121
115
</td>
122
116
</tr>
123
-
117
+
124
118
<tr>
125
119
<th>callback</th>
126
120
<td>required</td>
127
-
121
+
128
122
<td>
129
123
Callback invoked when the focus is updated. It is passed three arguments: <ol>
130
124
<li>
@@ -149,7 +143,7 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
149
143
</li>
150
144
</ul>
151
145
</li>
152
-
146
+
153
147
<li>
154
148
top coordinate of the view
155
149
</li>
@@ -159,7 +153,7 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
159
153
</ol>
160
154
</td>
161
155
</tr>
162
-
156
+
163
157
<tr>
164
158
<th>focusRatio</th>
165
159
<td>0.3819..</td>
@@ -179,25 +173,25 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
179
173
<td>false</td>
180
174
<td>Display position of the focus line (for debugging purposes).</td>
181
175
</tr>
182
-
176
+
183
177
<tr>
184
178
<th>topDownWeight</th>
185
179
<td>0</td>
186
180
<td>Extra focus height added to the section if it preceedes the other (used in **resolutionMode** 0 only).</td>
187
181
</tr>
188
-
182
+
189
183
<tr>
190
184
<th>viewMarginTop</th>
191
185
<td>0</td>
192
186
<td>Height of an area at the top of the view to be excluded (e.g. a fixed navigation menu).</td>
193
187
</tr>
194
-
188
+
195
189
<tr>
196
190
<th>viewMarginBottom</th>
197
191
<td>0</td>
198
192
<td>Height of an area at the bottom of the view to be excluded (e.g. a fixed navigation menu).</td>
199
193
</tr>
200
-
194
+
201
195
<tr>
202
196
<th>multiMode</th>
203
197
<td>false</td>
@@ -218,20 +212,20 @@ These options are active only when `$().scrollWatchMenu()` is used.
218
212
<th>Description</th>
219
213
</tr>
220
214
</thead >
221
-
215
+
222
216
<tbody >
223
217
<tr>
224
218
<th>menuActiveClass</th>
225
219
<td>active</td>
226
220
<td>Class of the active menu item.</td>
227
221
</tr>
228
-
222
+
229
223
<tr>
230
224
<th>menuItemSelector</th>
231
225
<td>*</td>
232
226
<td>Selector to match menu items, <code>*</code> matches all direct children of the menu element.</td>
233
227
</tr>
234
-
228
+
235
229
<tr>
236
230
<th>menuWindowScrollOffset</th>
237
231
<td>0</td>
@@ -243,7 +237,7 @@ These options are active only when `$().scrollWatchMenu()` is used.
243
237
<td>0</td>
244
238
<td>Scroll offset applied to the scroller (not window) when a menu link containing a hash is clicked.</td>
245
239
</tr>
246
-
240
+
247
241
<tr>
248
242
<th>menuScrollSpeed</th>
249
243
<td>500</td>
@@ -267,7 +261,7 @@ These options are active only when `$().scrollWatchMenu()` is used.
267
261
<td>true</td>
268
262
<td>Handle scroll offset when loading the page.</td>
269
263
</tr>
270
-
264
+
271
265
<tr>
272
266
<th>menuInitialHashOffsetTolerance</th>
273
267
<td>40</td>
0 commit comments