I have problem with DataTables working alongside Nette.
My JavaScript code:
$(document).ready(function(){
$('.table').DataTables();
});
HTML Nette:
{snippet customers}
<table class="table table-hover" id="userTable">
<thead>
<tr>
<th>Name</th>
<th>Country</th>
<th>Type</th>
</tr>
</thead>
<tbody>
{foreach $customers as $customer}
<tr>
<td>
<a href="{$presenter->link(':Customers:show', array('id' => $customer->id))}" target="_blank">
{$customer->name}
</a>
</td>
<td>{$customer->country}</td>
<td>{$customer->type}</td>
</tr>
{/foreach}
</tbody>
</table>
{/snippet}
It normally works, but when the Nette snippet is refreshed, DataTables elements (pages, order, etc.) are removed. If the page is refreshed, these elements return. I am using Nette Framework 2.3 and Doctrine 2.