I'm working on a web system and would like to create an interactive table on a page. Above the table, I have 4 buttons and would like to give them functionality. I would like to be able to select a row from the table to edit or view or select multiple rows from the table to delete. I would also like the changes made visually in the table to reflect in the database.
I'm using HTML, CSS and JavaScript in addition to the Bootstrap framework. I did a little research and found that the jQuery library and the DataTables plug-in could help me, but I have no idea how to use them.
The code below contains the table and the top buttons.
<div class="btn-toolbar" role="toolbar">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Add
</button>
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-minus" aria-hidden="true"></span> Remove
</button>
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
</button>
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> View
</button>
</div>
<table class="table table-bordered">
<tr>
<th>ID</th>
<th>Name</th>
<th>Version</th>
<th>Status</th>
<th>Priority</th>
<th>Date modified</th>
</tr>
<tr>
<td>RF-1</td>
<td><a href="edit-requirement.html">Sign in</a></td>
<td>1.0</td>
<td>Finished</td>
<td>High</td>
<td>2 May 2017</td>
</tr>
<tr>
<td>RF-2</td>
<td><a href="edit-requirement.html">Sign out</a></td>
<td>1.0</td>
<td>Finished</td>
<td>High</td>
<td>2 May 2017</td>
</tr>
</table>