Hello,
I am using the jquery split plugin which basically display a DataTables table on the main side and an html textarea on the flip side.
When I go from the flip side to the heads side ( = showing the datatable), all datatables events are just gone unbound including search events, filter events, pagination events, etc... I don't know why this happen and how to solve this. I've tried to destroy the table and recreate it with fnDestroy or just refresh the table with fnAjaxReload which works ok but only that the events do not get bound.
Here is the code:
Thanks for any tips,
Jimmy
I am using the jquery split plugin which basically display a DataTables table on the main side and an html textarea on the flip side.
When I go from the flip side to the heads side ( = showing the datatable), all datatables events are just gone unbound including search events, filter events, pagination events, etc... I don't know why this happen and how to solve this. I've tried to destroy the table and recreate it with fnDestroy or just refresh the table with fnAjaxReload which works ok but only that the events do not get bound.
Here is the code:
var self = this; $('.flipButton').bind("click",function(){ var elem = $(".myDatatableDiv"); if(elem.data('flipped')) { elem.revertFlip(); elem.data('flipped',false); //here I've tried self.datatable.fnDestroy(); // then self.datatable.dataTable(); // even self.datatable.fnAjaxReload(); but none worked self.datatable.dataTable(); } else { elem.flip({ direction:'lr', speed: 350, onBefore: function(){ elem.html(elem.siblings('.myTextArea').html()); }, color:'white' }); elem.data('flipped',true); } });
Thanks for any tips,
Jimmy