$(function() {
var tooltip = function(sliderObj, ui){
val1 = '<div id="slider_tooltip" style="margin-top:-20px">'+ sliderObj.slider("values", 0) +'</div>';
val2 = '<div id="slider_tooltip" style="margin-top:-20px">'+ sliderObj.slider("values", 1) +'</div>';
sliderObj.children('.ui-slider-handle').first().html(val1);
sliderObj.children('.ui-slider-handle').last().html(val2);
};
$( "#slider-range" ).slider({
range: true,
min: 0,
max: 10000000,
values: [ 0, 10000000 ],
slide: function( e, ui ) {
tooltip($(this),ui);
},
create:function(e,ui){
tooltip($(this),ui);
}
});
});
No comments:
Post a Comment