I have a drag and drop functionality. When the element
is dragging, I want to dynamically
set the position of the element and display that in the tooltip
. How can i able to do this
using kendoui.
I have defined like:
<div id='drag'><p>Drag me</p></div>
I have defined the tooltip like:
$("#drag").kendoToolTip({
position:"top",
content: "Initial"
});
Thne for dragging
$("#drag").draggable({
drag: function(){
$("#drag").data("kendoToolTip").content("Dragging");
},
stop: function(){
$("#drag").data("kendoToolTip").content("Drag stopped");
}
});
And i want to show the tool tip on the div
continuously on dragging
.
How can i do that
Any help is appreciated
The tooltip content can be changed dynamically using the AJAX request. The AJAX request should be made within the beforeRender event of the tooltip. On every success, the corresponding retrieved data will be set to the content property of the tooltip.
The Tooltip displays a popup hint for a specific HTML element. Its content can be defined either as static text or loaded dynamically with AJAX.
In order to invoke the method hide of kendoTooltip you should do: tooltip. data("kendoTooltip"). hide();
try this one friend,
$("#drag").data("kendoTooltip").options.content = "set content here...";
$("#drag").data("kendoTooltip").refresh();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With