JavaScript/jQuery Slider - Overview

The Slider is a UI component that allows an end user to set a numeric value on a continuous range of possible values.

View Demo

The following code adds a simple Slider to your page. The min and max properties limit the range of accepted values. The value sets the initial value for the UI component.

HTML
JavaScript
  • <div id="sliderContainer"></div>
  • $(function() {
  • $("#sliderContainer").dxSlider({
  • min: 0,
  • max: 100,
  • value: 25
  • });
  • });

In addition, you can specify the step of Slider values using the step property.

JavaScript
  • $(function() {
  • $("#sliderContainer").dxSlider({
  • min: 0,
  • max: 100,
  • value: 25,
  • step: 10
  • });
  • });
See Also