dzm
dzm

Reputation: 23534

jQuery qTip callback not working

I'm using a jQuery plugin called qTip (http://craigsworks.com/projects/qtip/docs/api/#callbacks) and trying to implement a callback function for dynamically loaded data.

Here's what I have:

$('#orders_table a').qtip('api').onRender(function(){
        alert('test');
 })

The qTip is being initialized for all of the links within the #orders_table.

Nothing happens however, when I load a qTip - It loads, but no alert.

Any ideas?

Thanks!

Upvotes: 0

Views: 3460

Answers (2)

Shane
Shane

Reputation: 5151

Just wanted to add that for qtip 2.0 the code looks like this: I'm omitting all other elements than what's necessary for a render callback, so keep that in mind.

$("#myselector").qtip({
    events: {
        render: function () {
            console.log("rendered");
        }
    }
});

Upvotes: 1

Gregg
Gregg

Reputation: 35864

What if you do it like this:

$('#orders_table a').qtip({
    api: {
        onRender:function() {
           alert('test');
        }
    }
});

Upvotes: 1

Related Questions