Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add slider step support from jQuery UI

  • Loading branch information...
commit e09374b41dce2eba5bfa32d858c8dc118ffd26cc 1 parent 7d20423
@jrowny jrowny authored johnbender committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/jquery.mobile.forms.slider.js
View
5 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
Please sign in to comment.
Something went wrong with that request. Please try again.