Cannot initialize tableTools - with test case
Cannot initialize tableTools - with test case
AppsbyICE
Posts: 6Questions: 2Answers: 0
http://live.datatables.net/xomunake/1/
http://live.datatables.net/xomunake/1/edit?html,css,js,output
datatable debugger code: ofehoc
The following page initializes the datatables, but I cannot select rows using the tableTools.
According to the debugger tableTools is not installed. Am I pointing to the incorrect cdn?
<!-- DataTables CSS -->
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.6/css/jquery.dataTables.min.css">
<!-- DataTables.tableTools CSS -->
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/tabletools/2.2.4/css/dataTables.tableTools.css">
<!-- Base jQuery -->
<script type="text/javascript" charset="utf8" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<!-- DataTables -->
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.6/js/jquery.dataTables.js"></script>
<!-- tableTools -->
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/2.2.4/js/dataTables.tableTools.min.js"></script>
<script type="text/javascript">
<!--
$(document).ready(function() {
var table = $('#accounts_id').DataTable();
var tt = new $.fn.dataTable.TableTools( table, {
sRowSelect: 'single'
} );
$( tt.fnContainer() ).insertAfter('div.info');
} );
//-->
</script>
The table is referenced in this way:
<div class="info">
</div>
<h3>Accounts</h3>
<table id="accounts_id" class="display">
Accounts
select | account | ledger | purpose | description | account_number |
---|---|---|---|---|---|
1 | DONATION - Cash - Rec | income | donation | Donation for which a receipt has been provided | 4110 |
2 | DONATION - Cash - Non | income | donation | Cash donation for which no receipt has been provided | 4120 |
3 | DONATION - CH | income | donation | Donation via Canada Helps | 4130 |
This discussion has been closed.
Answers
Getting the hang of markdown
Resolved.
The problem was with the CDN. I must have copied it incorrectly.