开发者

jQuery qTip callback not working

开发者 https://www.devze.com 2023-01-19 07:28 出处:网络
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.

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!


What if you do it like this:

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


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");
        }
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消