DHTMLX Docs & Samples Explorer

Index
dhtmlxslider
API Methods

## Constructor of dhtmlxSlider

            var slider = new dhtmlxSlider(parent,size,skin,vertical,min,max,value,step)

where

- parent - id of HTML element which will be used as parent ( or object itself
- size - (integer} size in pixels
- skin - {string} name of skin, optional
- vertical - (boolean} if set to true - slider will be rendered as vertical one
- min - (integer} max value of slider
- max - (integer} min value of slider
- value - (integer} current value of slider
- step - (integer} step of slider

If existing input object was defined as parent - slider will replace it

          <div id='my_slider_here'></div>
          <script>
          //common init code
          var slider = new dhtmlxSlider("my_slider_here",100);
          </script>

Starting from 2.5 version, slider can be initialized by object notation

          var slider = new dhtmlxSlider({
              some_option1:some_value_1,
              some_option2:some_value_2,
              ...
              some_optionN:some_value_N,
          })

List of supported options

    	slider = new dhtmlxSlider({
    		parent:"my_slider_here",
                    size:100,
    		onChange:function(){
    			alert("I'm changed");
    		}
    	});