2
I created a table on my system using the jquery datatable library, but it is not working. At the end of the view I made the code declaration in javascript, but the style is not applied.
Follows code below:
<script type="text/javascript">
$(document).ready(function () {
$('.table').dataTable({
"order": [[1, "asc"]]
});
});
</script>
And css:
<link href="@Url.Content("~/content/DataTables/css/datatables.bootstrap.css")" rel="stylesheet" />
Note: Use 3 datatables, only one does not work and the code is identical for the 3 cases.
"$('.table')" Is there really such a class table? Or are you trying to manipulate the table? If so, switch to
$('table')
– Bsalvo