I want to do this :
- make a jQuery slider with two handles
- identify a handle when clicked
- associate the color of a clicked handle to the color of a color-picker
- Write a function which can add another handle to the slider
-
I tried this :
`$(“#slider”).delegate(‘.ui-slider-handle’,’click’, function () {
var handleNo=$(this).index();
if (handleNo==0){ // code required //show a colorpicker whose selected color will be the color of this handle };
if (handleNo==1){ // code required //show a colorpicker whose selected color will be the color of this handle }; });
function addSliderHandle(){ // code required // this function will be able to add new hanldes to above-mentioned slider // every new hanlde will also have the above event attached }
`
Are you looking at a Range Slider: http://jqueryui.com/demos/slider/#range
Could you also edit your question to answer the below?
– When you say multiple, how many do you actually mean?
– Are handles going to be added at Runtime?