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

DataTable not working :/

$
0
0
Hello there, I just downloaded the datatables and wante to implement on my website...
I added the css and js files :
        <LINK href="/css/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery.js"></script>        
<script src="/js/jquery.dataTables.js"></script>

i have my table

<table id="mytable">
<thead>
<tr>
<th>1</th><th>2</th><th>3</th>
</tr>
</thead>
<tbody>
<?php
foreach($items as $item):
?>
<tr>
<td><?php echo $item->1; ?></td>
<td><?php echo $item->2; ?></td>
<td><?php echo $item->3; ?></td>
</tr>
<?php
endforeach;
?>
</tbody>
</table>

just after that I added

$(document).ready(function() {
$('#mytable').dataTable();
});

It doesnt work ... and I dont know why because I think I did everything ...
When I inspected the website it showed one error when loading script:
http://screenshotuploader.com/s/01/izh-a1qi9

Viewing all articles
Browse latest Browse all 82040

Trending Articles



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