sanmai sanmai - 1 year ago 292
jQuery Question

AJAX content in a jQuery UI Tooltip Widget

There is a new Tooltip Widget in jQuery UI 1.9, whose API docs hint that AJAX content can be displayed in it, but without any further details. I guess I can accomplish something like that with a synchronous and blocking request, but this isn't what I want.

How do I make it display any content that was retrieved with an asynchronous AJAX request?

Answer Source

Here is a ajax example of jqueryui tootip widget from my blog.hope it helps.

    position: { my: "left+15 top", at: "right center" },
    content:function(callback) {
        $.get('preview.php', {
        }, function(data) {
            callback(data); //**call the callback function to return the value**
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download