$("table#myTableId").dataTable();
<script type="text/javascript"charset="utf-8"> d3.text(file, function (datasetText) { var rows = d3.csv.parseRows(datasetText); var tbl = d3.select("#container") .append("table"); tbl.attr("id","tableID"); // headers tbl.append("thead").append("tr") .selectAll("th") .data(rows[0]) .enter().append("th") .text(function(d) { return d; }); // data tbl.append("tbody") .selectAll("tr").data(rows.slice(1)) .enter().append("tr") .selectAll("td") .data(function(d){return d;}) .enter().append("td") .text(function(d){return d;}) $(document).ready(function() { $('#tableID').dataTable(); } ); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)