Table shifts down when user click a button with function call
Table shifts down when user click a button with function call
I'm obviously missing something simple. Here's my table:
[code]
...
136...
...
[/code]
Here's the JavaScript:
[code]
$(document).ready(function(){
$('#tblFac').dataTable();
$('#testx').click( function() {
oTable = $('#tblFac').dataTable();
} );
});
[/code]
Each click of the button causes the entire table to shift down a line and the wording outside of the table ("Show 10 entries", "Showing 1 to 10 of 16 entries") to replicate downwards. I have no CSS going on of my own. I have columnar sorting set up and it works fine. Any idea what I've messed up?
The test web page is at http://www.elarsen.net/temp/chkall/test_2.htm
Tested with FireFox, Chrome and Internet Explorer.
[code]
...
136...
...
[/code]
Here's the JavaScript:
[code]
$(document).ready(function(){
$('#tblFac').dataTable();
$('#testx').click( function() {
oTable = $('#tblFac').dataTable();
} );
});
[/code]
Each click of the button causes the entire table to shift down a line and the wording outside of the table ("Show 10 entries", "Showing 1 to 10 of 16 entries") to replicate downwards. I have no CSS going on of my own. I have columnar sorting set up and it works fine. Any idea what I've messed up?
The test web page is at http://www.elarsen.net/temp/chkall/test_2.htm
Tested with FireFox, Chrome and Internet Explorer.
This discussion has been closed.
Replies
If you take a peak at this discussion ( http://datatables.net/forums/comments.php?DiscussionID=1446&page=1#Item_2 ) it talks about this issue. Basically you can't re-initialise a DataTable like this.
Allan