dynamically generated - slider scriptaculous javascript -
i'm trying dynamically add sliders (the scriptaculous ones), can't move normal?
here's js-code use:
var slider_div = document.getelementbyid('time_sliderd'); var newslider = document.createelement('div'); var slideridname = 'slidetime'; newslider.setattribute('id',slideridname); newslider.classname = "slidert"; slider_div.appendchild(newslider); var nd = document.createelement('div'); nd.classname = "handlet"; newslider.appendchild(nd); var t_slider = $(slideridname); new control.slider(t_slider.down('.handlet'), t_slider, { range: $r(1, 9), slidervalue: slidervalues[17], values: [1,2,3,4,5,6,7,8,9], //aligny: -5, onslide: function(value) { //something alert(value); }, onchange: function(value) { //something alert(value); } });
https://jsfiddle.net/pahjv/11/
br!
Comments
Post a Comment