Skip to content

Commit 9af3e46

Browse files
committed
Update file: jquery-mousewheel-by-jquery.html
1 parent b061b82 commit 9af3e46

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

jquery-plugins/jquery-mousewheel-by-jquery.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ <h1 id="packageName">jQuery Mousewheel</h1>
177177
<h1>jQuery Mouse Wheel Plugin</h1>
178178
<p>A <a href="http://jquery.com/">jQuery</a> plugin that adds cross-browser mouse wheel support with delta normalization.</p>
179179
<p>In order to use the plugin, simply bind the <code>mousewheel</code> event to an element.</p>
180-
<p>It also provides two helper methods called <code>mousewheel</code> and <code>unmousewheel</code>
180+
<p>It also provides two helper methods called <code>mousewheel</code> and <code>unmousewheel</code><br />
181181
that act just like other event helper methods in jQuery.</p>
182-
<p>The event object is updated with the normalized <code>deltaX</code> and <code>deltaY</code> properties.
183-
In addition there is a new property on the event object called <code>deltaFactor</code>. Multiply
184-
the <code>deltaFactor</code> by <code>deltaX</code> or <code>deltaY</code> to get the scroll distance that the browser
182+
<p>The event object is updated with the normalized <code>deltaX</code> and <code>deltaY</code> properties.<br />
183+
In addition there is a new property on the event object called <code>deltaFactor</code>. Multiply<br />
184+
the <code>deltaFactor</code> by <code>deltaX</code> or <code>deltaY</code> to get the scroll distance that the browser<br />
185185
has reported.</p>
186186
<p>Here is an example of using both the bind and helper method syntax:</p>
187187
<pre class="prettyprint linenums lang-language"><code>// using on
@@ -193,28 +193,28 @@ <h1>jQuery Mouse Wheel Plugin</h1>
193193
$('#my_elem').mousewheel(function(event) {
194194
console.log(event.deltaX, event.deltaY, event.deltaFactor);
195195
});</code></pre>
196-
<p>The old behavior of adding three arguments (<code>delta</code>, <code>deltaX</code>, and <code>deltaY</code>) to the
196+
<p>The old behavior of adding three arguments (<code>delta</code>, <code>deltaX</code>, and <code>deltaY</code>) to the<br />
197197
event handler is now deprecated and will be removed in later releases.</p>
198198
<h2>The Deltas...</h2>
199-
<p>The combination of browsers, operating systems, and devices offer a huge range of possible delta values. In fact if the user
200-
uses a trackpad and then a physical mouse wheel the delta values can differ wildly. This plugin normalizes those
201-
values so you get a whole number starting at +-1 and going up in increments of +-1 according to the force or
202-
acceleration that is used. This number has the potential to be in the thousands depending on the device.
199+
<p>The combination of browsers, operating systems, and devices offer a huge range of possible delta values. In fact if the user<br />
200+
uses a trackpad and then a physical mouse wheel the delta values can differ wildly. This plugin normalizes those<br />
201+
values so you get a whole number starting at +-1 and going up in increments of +-1 according to the force or<br />
202+
acceleration that is used. This number has the potential to be in the thousands depending on the device.<br />
203203
Check out some of the data collected from users <a href="http://mousewheeldatacollector.herokuapp.com/">here</a>.</p>
204204
<h3>Getting the scroll distance</h3>
205-
<p>In some use-cases we prefer to have the normalized delta but in others we want to know how far the browser should
206-
scroll based on the users input. This can be done by multiplying the <code>deltaFactor</code> by the <code>deltaX</code> or <code>deltaY</code>
205+
<p>In some use-cases we prefer to have the normalized delta but in others we want to know how far the browser should<br />
206+
scroll based on the users input. This can be done by multiplying the <code>deltaFactor</code> by the <code>deltaX</code> or <code>deltaY</code><br />
207207
event property to find the scroll distance the browser reported.</p>
208-
<p>The <code>deltaFactor</code> property was added to the event object in 3.1.5 so that the actual reported delta value can be
208+
<p>The <code>deltaFactor</code> property was added to the event object in 3.1.5 so that the actual reported delta value can be<br />
209209
extracted. This is a non-standard property.</p>
210210
<h2>Building the code in the repo</h2>
211211
<pre class="prettyprint linenums lang-language"><code>$ git clone git@github.com:jquery/jquery-mousewheel.git
212212
$ cd jquery-mousewheel/
213213
$ npm install
214214
$ npm run build
215215
$ npm run karma</code></pre>
216-
<p>The unit tests run by karma are <em>very</em> basic sanity checks; improvements welcome.
217-
To fully test the plugin, load <a href="test/index.html">test/index.html</a> in each supported
216+
<p>The unit tests run by karma are <em>very</em> basic sanity checks; improvements welcome.<br />
217+
To fully test the plugin, load <a href="test/index.html">test/index.html</a> in each supported<br />
218218
browser and follow the instructions at the top of the file after the unit tests finish.</p>
219219
</div>
220220

0 commit comments

Comments
 (0)