Skip to content

Commit 74613ba

Browse files
committed
Update structure, add bower.json
1 parent 4c8e3fc commit 74613ba

5 files changed

+39
-29
lines changed

README.markdown

+18-24
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# jQuery ScrollWatch 1.3
1+
# jQuery ScrollWatch
22

33
jQuery plugin to implement navigation or any other functionality based on current scrolling position of the page or inside a custom element.
44

5-
See [demo.html](demo.html) for an example.
5+
See `demo.html` for an example.
66

77
## Functionality
88

@@ -16,13 +16,7 @@ Tested in Mozilla Firefox, Google Chrome, Safari, Opera and MSIE 7+
1616

1717
## Known limitations
1818

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
2620

2721
## Usage
2822

@@ -98,14 +92,14 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
9892
<th>Description</th>
9993
</tr>
10094
</thead>
101-
95+
10296
<tbody>
10397
<tr>
10498
<th>scroller</th>
10599
<td>window</td>
106100
<td>Element to watch for scrolling events (must have <code>position: relative or absolute</code> if not window)</td>
107101
</tr>
108-
102+
109103
<tr>
110104
<th>resolutionMode</th>
111105
<td>0</td>
@@ -120,11 +114,11 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
120114
</ul>
121115
</td>
122116
</tr>
123-
117+
124118
<tr>
125119
<th>callback</th>
126120
<td>required</td>
127-
121+
128122
<td>
129123
Callback invoked when the focus is updated. It is passed three arguments: <ol>
130124
<li>
@@ -149,7 +143,7 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
149143
</li>
150144
</ul>
151145
</li>
152-
146+
153147
<li>
154148
top coordinate of the view
155149
</li>
@@ -159,7 +153,7 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
159153
</ol>
160154
</td>
161155
</tr>
162-
156+
163157
<tr>
164158
<th>focusRatio</th>
165159
<td>0.3819..</td>
@@ -179,25 +173,25 @@ Both `$().scrollWatch()` and `$().scrollWatchMenu()` return an object with follo
179173
<td>false</td>
180174
<td>Display position of the focus line (for debugging purposes).</td>
181175
</tr>
182-
176+
183177
<tr>
184178
<th>topDownWeight</th>
185179
<td>0</td>
186180
<td>Extra focus height added to the section if it preceedes the other (used in **resolutionMode** 0 only).</td>
187181
</tr>
188-
182+
189183
<tr>
190184
<th>viewMarginTop</th>
191185
<td>0</td>
192186
<td>Height of an area at the top of the view to be excluded (e.g. a fixed navigation menu).</td>
193187
</tr>
194-
188+
195189
<tr>
196190
<th>viewMarginBottom</th>
197191
<td>0</td>
198192
<td>Height of an area at the bottom of the view to be excluded (e.g. a fixed navigation menu).</td>
199193
</tr>
200-
194+
201195
<tr>
202196
<th>multiMode</th>
203197
<td>false</td>
@@ -218,20 +212,20 @@ These options are active only when `$().scrollWatchMenu()` is used.
218212
<th>Description</th>
219213
</tr>
220214
</thead>
221-
215+
222216
<tbody>
223217
<tr>
224218
<th>menuActiveClass</th>
225219
<td>active</td>
226220
<td>Class of the active menu item.</td>
227221
</tr>
228-
222+
229223
<tr>
230224
<th>menuItemSelector</th>
231225
<td>*</td>
232226
<td>Selector to match menu items, <code>*</code> matches all direct children of the menu element.</td>
233227
</tr>
234-
228+
235229
<tr>
236230
<th>menuWindowScrollOffset</th>
237231
<td>0</td>
@@ -243,7 +237,7 @@ These options are active only when `$().scrollWatchMenu()` is used.
243237
<td>0</td>
244238
<td>Scroll offset applied to the scroller (not window) when a menu link containing a hash is clicked.</td>
245239
</tr>
246-
240+
247241
<tr>
248242
<th>menuScrollSpeed</th>
249243
<td>500</td>
@@ -267,7 +261,7 @@ These options are active only when `$().scrollWatchMenu()` is used.
267261
<td>true</td>
268262
<td>Handle scroll offset when loading the page.</td>
269263
</tr>
270-
264+
271265
<tr>
272266
<th>menuInitialHashOffsetTolerance</th>
273267
<td>40</td>

bower.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "jquery-scrollwatch",
3+
"description": "jQuery plugin to implement navigation or any other functionality based on current scrolling position of the page or inside a custom element.",
4+
"version": "1.0.0",
5+
"keywords": [
6+
"js",
7+
"jquery",
8+
"scroll",
9+
"watch"
10+
],
11+
"main": [
12+
"src/jquery.scrollwatch.js"
13+
],
14+
"ignore": [
15+
".*",
16+
"src/demo.html"
17+
],
18+
"dependencies": {
19+
"jquery": ">= 1.9.0"
20+
}
21+
}

jquery.scrollwatch.min.js

-5
This file was deleted.

demo.html src/demo.html

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)