diff options
author | Felix Nagel <info@felixnagel.com> | 2013-11-13 19:45:56 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-11-13 19:45:56 +0100 |
commit | ab2219b6ac3dbab58885a0bd2aaac01c4bcc1c2f (patch) | |
tree | dedf39afe3330bae4eec603297432d972e5bcfc1 /ui/jquery.ui.slider.js | |
parent | a6c5f58d8243b39c6cd57b76ffb0776adfcc8b1c (diff) | |
parent | 14782c04e2201c53e3ecb80b086f1a4c27aa991d (diff) | |
download | jquery-ui-ab2219b6ac3dbab58885a0bd2aaac01c4bcc1c2f.tar.gz jquery-ui-ab2219b6ac3dbab58885a0bd2aaac01c4bcc1c2f.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r-- | ui/jquery.ui.slider.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index df71f363f..10efc4bf8 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -15,10 +15,6 @@ */ (function( $, undefined ) { -// number of pages in a slider -// (how many times can you page up/down to go through the whole range) -var numPages = 5; - $.widget( "ui.slider", $.ui.mouse, { version: "@VERSION", widgetEventPrefix: "slide", @@ -41,6 +37,10 @@ $.widget( "ui.slider", $.ui.mouse, { stop: null }, + // number of pages in a slider + // (how many times can you page up/down to go through the whole range) + numPages: 5, + _create: function() { this._keySliding = false; this._mouseSliding = false; @@ -637,10 +637,13 @@ $.widget( "ui.slider", $.ui.mouse, { newVal = this._valueMax(); break; case $.ui.keyCode.PAGE_UP: - newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) ); + newVal = this._trimAlignValue( + curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) + ); break; case $.ui.keyCode.PAGE_DOWN: - newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) ); + newVal = this._trimAlignValue( + curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) ); break; case $.ui.keyCode.UP: case $.ui.keyCode.RIGHT: @@ -674,7 +677,6 @@ $.widget( "ui.slider", $.ui.mouse, { } } } - }); }(jQuery)); |