From a79799e3b39f1468a40583ae1573f40a8929400c Mon Sep 17 00:00:00 2001 From: John Bender Date: Wed, 2 Feb 2011 23:46:20 -0800 Subject: [PATCH] added step tests for keypress, removed data-step attribute check in favor of html5 range step attribute --- js/jquery.mobile.forms.slider.js | 2 +- tests/unit/slider/index.html | 4 ++++ tests/unit/slider/slider_events.js | 18 +++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.forms.slider.js b/js/jquery.mobile.forms.slider.js index 9cac74b4..61fac56f 100644 --- a/js/jquery.mobile.forms.slider.js +++ b/js/jquery.mobile.forms.slider.js @@ -34,7 +34,7 @@ $.widget( "mobile.slider", $.mobile.widget, { }, min = (cType == 'input') ? parseFloat(control.attr('min')) : 0, max = (cType == 'input') ? parseFloat(control.attr('max')) : control.find('option').length-1, - step = window.parseFloat(control.attr('data-step') || 1), + step = window.parseFloat(control.attr('step') || 1), slider = $('
'), handle = $('') .appendTo(slider) diff --git a/tests/unit/slider/index.html b/tests/unit/slider/index.html index 02787f98..a8fc034d 100644 --- a/tests/unit/slider/index.html +++ b/tests/unit/slider/index.html @@ -77,6 +77,10 @@ +
+ +
+