Set slider step value
Description
The following code shows how to set slider step value.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type="text/javascript"
src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.css">
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){<!-- ww w. ja v a 2 s . c om-->
$(document).on('focus', '#slider-1', function () {
$(this).attr('step', '1');
});
$(document).on('click', '.ui-slider-handle', function () {
$('#slider-1').attr('step', '10');
});
});//]]>
</script>
</head>
<body>
<form>
<label for="slider-1">Slider:</label>
<input type="range" name="slider-1" id="slider-1" min="0" max="100" value="10" step="10" />
</form>
</body>
</html>