I use the jquery library in order to display a sql result. On the first page of the datatable the previous button is by default deactivated. However I want it to be hidden, same goes for the next button on the last page.
As it is deactivated automatically I was thinking that there might be a parameter or sth to hide it instead, however I was not finding much during my research.
My table looks like this:
$('#userTable').DataTable();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.16/datatables.min.css"/>
<script src="https://cdn.datatables.net/v/dt/dt-1.10.16/datatables.min.js"></script>
<table id="userTable">
<thead>
<tr>
<th>heading1</th>
<th>heading2</th>
</tr>
</thead>
<tbody>
<tr>
<td>element11</td>
<td>element12</td>
</tr>
<tr>
<td>element21</td>
<td>element22</td>
</tr>
<tr>
<td>element31</td>
<td>element32</td>
</tr>
<tr>
<td>elementN1</td>
<td>elementN2</td>
</tr>
</tbody>
</table>
'if
and adjust the table