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!
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");
}
}
});
精彩评论