15
15
*/
16
16
( function ( $ , undefined ) {
17
17
18
- // number of pages in a slider
19
- // (how many times can you page up/down to go through the whole range)
20
- var numPages = 5 ;
21
-
22
18
$ . widget ( "ui.slider" , $ . ui . mouse , {
23
19
version : "@VERSION" ,
24
20
widgetEventPrefix : "slide" ,
@@ -41,6 +37,10 @@ $.widget( "ui.slider", $.ui.mouse, {
41
37
stop : null
42
38
} ,
43
39
40
+ // number of pages in a slider
41
+ // (how many times can you page up/down to go through the whole range)
42
+ numPages : 5 ,
43
+
44
44
_create : function ( ) {
45
45
this . _keySliding = false ;
46
46
this . _mouseSliding = false ;
@@ -637,10 +637,12 @@ $.widget( "ui.slider", $.ui.mouse, {
637
637
newVal = this . _valueMax ( ) ;
638
638
break ;
639
639
case $ . ui . keyCode . PAGE_UP :
640
- newVal = this . _trimAlignValue ( curVal + ( ( this . _valueMax ( ) - this . _valueMin ( ) ) / numPages ) ) ;
640
+ newVal = this . _trimAlignValue (
641
+ curVal + ( ( this . _valueMax ( ) - this . _valueMin ( ) ) / this . numPages ) ) ;
641
642
break ;
642
643
case $ . ui . keyCode . PAGE_DOWN :
643
- newVal = this . _trimAlignValue ( curVal - ( ( this . _valueMax ( ) - this . _valueMin ( ) ) / numPages ) ) ;
644
+ newVal = this . _trimAlignValue (
645
+ curVal - ( ( this . _valueMax ( ) - this . _valueMin ( ) ) / this . numPages ) ) ;
644
646
break ;
645
647
case $ . ui . keyCode . UP :
646
648
case $ . ui . keyCode . RIGHT :
@@ -674,7 +676,6 @@ $.widget( "ui.slider", $.ui.mouse, {
674
676
}
675
677
}
676
678
}
677
-
678
679
} ) ;
679
680
680
681
} ( jQuery ) ) ;
0 commit comments