JSFiddle - React, Tailwind, and code Playground
by rajmalhotra123
HTML
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Show Policies</title>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.css">
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.js"></script>
</head>
<body>
<table id="#table_id" class="display">
<tbody>
<tr>
<td>1</td>
<td>Value1</td>
<td>Name1</td>
<td>Desc1</td>
</tr>
<tr>
<td>2</td>
<td>Value2</td>
<td>Name2</td>
<td>Desc2</td>
</tr>
</tbody>
</table>
</body>
</html>
JavaScript
$(document).ready( function () {
$('#table_id').DataTable({
"columnDefs": [
{ "title": "ID" },
{ "title": "Value"},
{ "title": "name"},
{"title": "desc"}
]
});
});