Permalink
Browse files

add toggle for mousewheel scrolling

  • Loading branch information...
1 parent 2e3dddd commit 40153f7d91802b2092d3a04204227aecc233f692 @rehandalal committed Apr 20, 2012
Showing with 14 additions and 5 deletions.
  1. +1 −1 README.md
  2. +8 −1 index.html
  3. +5 −3 jquery-scrollable-1.0.0.js
View
@@ -39,4 +39,4 @@ Additionally you may pass options through to this function:
});
</script>
-For more usage and examples see: examples.html
+For more usage and examples see: index.html
View
@@ -37,11 +37,18 @@
<p>
<strong>margin</strong> (Default: 0)
- <br/>This determines the margin (in pixels) around the track of the scrollbar.
+ <br/>This determines the margin (in pixels) around the track of
+ the scrollbar.
<br /><em>Note: This must be an integer value.</em>
</p>
<p>
+ <strong>mousewheel</strong> (Default: true)
+ <br/>Set to true to allow scrolling with the mousewheel.
+ <br />Accepted values: <em>true, false</em>
+ </p>
+
+ <p>
<strong>mousewheel_step</strong> (Default: 32)
<br/>The distance (in pixels) that will be scrolled on each
step in the rotation of the mousewheel.
@@ -113,7 +113,7 @@
}
});
- // Handle hover events if necessary
+ // Handle hover
if (data.fade === true) {
container.hover(function(){
container.data('hovering', true);
@@ -125,8 +125,10 @@
}
// Handle mousewheel
- container.on("DOMMouseScroll", onMouseWheel);
- container.on("mousewheel", onMouseWheel);
+ if (data.mousewheel === true) {
+ container.on("DOMMouseScroll", onMouseWheel);
+ container.on("mousewheel", onMouseWheel);
+ }
// Hide the scrollbar
function hide() {

0 comments on commit 40153f7

Please sign in to comment.