Must be used :not()with selectors :last-childas shown below: -
$('#students tbody').on('click', 'tr.details-control td:not(:last-child)', function() {
alert('click');
});
Working example: -
$('#students tbody').on('click', 'tr.details-control td:not(:last-child)', function() {
alert('click');
});
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table id="students" class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>1</th>
<th>2</th>
<th>....</th>
<th>Last</th>
</tr>
</thead>
<tbody>
<tr class="details-control">
<td>First</td>
<td>Second</td>
<td>......</td>
<td>No Alert</td>
</tr>
<tr class="details-control">
<td>First</td>
<td>Second</td>
<td>......</td>
<td>No Alert</td>
</tr>
</tbody>
</table>
Run codeHide result source
share