Set step value for slider in JavaScript
Description
The following code shows how to set step value for slider.
Example
<!--from w ww. j ava2 s . c o m-->
<html lang="en">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
var sliderOpts = {
steps: 10
};
$("#mySlider").slider(sliderOpts);
});
</script>
</head>
<body>
<div id="mySlider"></div>
</body>
</html>
The code above generates the following result.
Javascript Tutorial Slider
Build jQuery UI Slider - Colorpicker in Jav...
Build jQuery UI Slider - Default functional...
Build jQuery UI Slider - Multiple sliders i...
Build jQuery UI Slider - Range slider in Ja...
Build jQuery UI Slider - Range with fixed m...
Build jQuery UI Slider - Range with fixed m...
Build jQuery UI Slider - Slider bound to se...
Build jQuery UI Slider - Slider scrollbar i...
Build jQuery UI Slider - Snap to increments...
Build jQuery UI Slider - Vertical range sli...
Build jQuery UI Slider - Vertical slider in...
Create a Slide in/out dialog in JavaScript
Handle Slider events: change, slide, start,...
Share Three sliders for event handler in Ja...
Build jQuery UI Slider - Colorpicker in Jav...
Build jQuery UI Slider - Default functional...
Build jQuery UI Slider - Multiple sliders i...
Build jQuery UI Slider - Range slider in Ja...
Build jQuery UI Slider - Range with fixed m...
Build jQuery UI Slider - Range with fixed m...
Build jQuery UI Slider - Slider bound to se...
Build jQuery UI Slider - Slider scrollbar i...
Build jQuery UI Slider - Snap to increments...
Build jQuery UI Slider - Vertical range sli...
Build jQuery UI Slider - Vertical slider in...
Create a Slide in/out dialog in JavaScript
Handle Slider events: change, slide, start,...
Set step value for slider in JavaScript
Set the max value for slider in JavaScriptShare Three sliders for event handler in Ja...