tooltips after fnReloadAjax
tooltips after fnReloadAjax
I am using the fnReloadAjax function from http://datatables.net/plug-ins#api_fnReloadAjax, everything works fine so far but:
On my first load of the table, I use tooltips with fnInitComplete to show some additional data. After fnReloadAjax these tooltips do not work anymore, how can I get them running?
On my first load of the table, I use tooltips with fnInitComplete to show some additional data. After fnReloadAjax these tooltips do not work anymore, how can I get them running?
This discussion has been closed.
Replies
You just need to add the event handlers to the table rows again after the fnReloadAjax call as re-initialised the table. You might need to add a callback function to the plug-in or just customise it to your needed.
This demo might be of some use: http://datatables.net/examples/example_events_post_init.html
As might Visual Event - which shows what elements have events attached: http://www.sprymedia.co.uk/article/Visual+Event
Regards,
Allan
Now I only need to get this tooltips also displaying after going to the next results via the pagination....
Just ad this at your table options:
"fnDrawCallback": function() { tooltips(); },
where tooltips is a tooltip function like:
var tooltips = function() {
$('a.tips').cluetip({
arrows: true,
dropShadow: true,
cursor: 'pointer',
cluetipClass: 'jtip'
});
};