mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-26 06:53:44 +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,7 +254,8 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
||||||
var control = this.element, percent,
|
var control = this.element, percent,
|
||||||
cType = control[0].nodeName.toLowerCase(),
|
cType = control[0].nodeName.toLowerCase(),
|
||||||
min = cType === "input" ? parseFloat( control.attr( "min" ) ) : 0,
|
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" ) {
|
if ( typeof val === "object" ) {
|
||||||
var data = val,
|
var data = val,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue