I want to display tooltip text dynamically from a server using an ajax call. Currently, the tooltip text is not updated on the first click, because the ajax call takes some time to receive the data.
$('.class').tipsy({
gravity: $.fn.tipsy.autoNS,
html: true,
opacity: 1,
trigger: "click",
hoverlock: true,
title: function () {
$.ajax({
url: apiurl,
type:'GET',
success: function(data){
return '<p>' + data + '</p>';
});
}
})
How can I refresh tipsy or show tipsy tooltip programmatically?