| Sample: dhtmlxSlider | Initialization | dhtmlxSlider main page |

DHTML JavaScript Slider samples

    <div id="sliderBox"></div>
    <script>
        //slider can be initialized in specified container
        var slider1 = new dhtmlxSlider("sliderBox", 100);
        slider1.setImagePath("../../codebase/imgs/");
        slider1.init();
        // first parametr - parent node, in case of direct initialization must be set to null
        // second parametr - width of slider</script>

    <script>
        //slider can be initialized directly in page , on place of javascript code
        var slider2 = new dhtmlxSlider(null, 200);
        slider2.init();
        // first parametr - parent node, in case of direct initialization must be set to null</script>

    <script>
        //third parameter is a skin type
      var slider4 =    new dhtmlxSlider(null, 300,"ball");
      slider4.init();
        var slider5 = new dhtmlxSlider(null, 300,"bar");
        slider5.init();</script>

    <table><tr><td id="sliderBox2"></td><td id="sliderBox3"></td></tr></table>
    <script>
        //4th parameter is a flag of vertical orientation
           var slider6 = new dhtmlxSlider("sliderBox2", 200,"ball",true);
           slider6.init();
           var slider7 = new dhtmlxSlider("sliderBox3", 100,"bar",true);
           slider7.init();
        // first parametr - parent node, in case of direct initialization must be set to null</script>

    <script>
        //8th parameter is a step of slider (1 by default)
           var slider8 = new dhtmlxSlider(null, 200,"simplesilver",false,null,null,null,16);
          slider8.init();
           var slider9 = new dhtmlxSlider(null, 100,"simplesilver",false,null,null,null,32);
           slider9.init();</script>

    <script>
        //5th,6th and 7th parameters is slider min, max and start values
        //please refer to "Configure numeric output" sample for more details
           var slider10 = new dhtmlxSlider(null, 200,"simplesilver",false,0,100,50);
           slider10.init();
           var slider11 = new dhtmlxSlider(null, 300,"simplesilver",false,400,500,425);
           slider11.init();</script>