samedi 31 janvier 2015

return index of chaged handle on jquery-ui slider


I have a jquery ui slider :



$( "#slider" ).slider({
values: [ 10, 25,45,176 ],
max:190,
change: function( event, ui ) {
var index = $("#slider span").index(ui.handle);
$( "#index" ).text( "That was handle index #" + index );
}
});


i want to return the index of changed single handle. but handle object returns all spans ( handles). how can i do that?





Aucun commentaire:

Enregistrer un commentaire