I need to allow sorting on a specific element using jQuery sortable.Please check code below.
<html lang="en">
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function () {
$("tbody").sortable();
});
</script>
</head>
<body>
<table>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr class="grid">
<td>AB</td>
<td>[email protected]</td>
<td><img src="icon_info.gif" border="0" alt="Info" title="Info" class="icon"></td>
</tr>
<tr class="grid">
<td>CD</td>
<td>[email protected]</td>
<td><img src="icon_info.gif" border="0" alt="Info" title="Info" class="icon"></td>
</tr>
<tr class="grid">
<td>EF</td>
<td>[email protected]</td>
<td><img src="icon_info.gif" border="0" alt="Info" title="Info" class="icon"></td>
</tr>
</tbody>
</table>
</body>
In this code I need to allow sorting only on action column not on name and email column. Please suggest if we can do this.