How to Attach A Tooltip to a Dragable Element
Can you please take a look at this demo and let me know how I can attach the tooltip to jquery ui handler so when the handler moves the tooltip also moves?
Here is my code:
- $(function () {
- $("#slider-vertical").slider({
- orientation: "vertical",
- range: "min",
- min: 0,
- max: 100,
- value: 60,
- slide: function (event, ui) {
- $("#amount").val(ui.value);
- }
- });
- $("#amount").val($("#slider-vertical").slider("value"));
- $(".ui-slider-handle").attr("rel", "tooltip");
- $(".ui-slider-handle").attr("data-toggle", "tooltip");
- $(".ui-slider-handle").attr("data-placement", "left");
- $(".ui-slider-handle").attr("title", "This");
- $("[rel='tooltip']").tooltip();
- });
Thanks