Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82111

DataTables events unbound when using jquery split plugin

$
0
0
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:

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

Viewing all articles
Browse latest Browse all 82111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>