mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
add slider step support from jQuery UI
This commit is contained in:
parent
7d204230f0
commit
e09374b41d
1 changed files with 3 additions and 2 deletions
|
|
@ -254,8 +254,9 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|||
var control = this.element, percent,
|
||||
cType = control[0].nodeName.toLowerCase(),
|
||||
min = cType === "input" ? parseFloat( control.attr( "min" ) ) : 0,
|
||||
max = cType === "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length - 1;
|
||||
|
||||
max = cType === "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length - 1,
|
||||
step = (cType === "input" && parseFloat(control.attr("step"))>0) ? parseFloat(control.attr("step")) : 1;
|
||||
|
||||
if ( typeof val === "object" ) {
|
||||
var data = val,
|
||||
// a slight tolerance helped get to the ends of the slider
|
||||
|
|
|
|||
Loading…
Reference in a new issue