Permalink
Browse files

add slider step support from jQuery UI

  • Loading branch information...
1 parent 7d20423 commit e09374b41dce2eba5bfa32d858c8dc118ffd26cc @jrowny jrowny committed with johnbender Aug 11, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/jquery.mobile.forms.slider.js
@@ -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

0 comments on commit e09374b

Please sign in to comment.