Click all td in table row except the last one

How can I click all the cell in table row except the last cell ?

 <table class="table table-striped table-hover" id="mytable">

   <tr>
       <th>id</th>
       <th>name</th>
       <th>lastname</th>
       <th>address</th>
       <th></th>
   </tr>

</table>

dynamically adding table row.

for(var i=0;i<data.length;i++){
      $('#mytable tbody tr:last').after('<tr id="'+data['id'][i]+'"><td>'+data['id'][i]+'</td><td>'+data['name'][i]+'</td><td>'+data['lastame'][i]+'</td><td>'+data['age'][i]+'</td><td><button class="btn btn-danger btn-block btn-sm" type="submit">Delete</button></td></tr>');

}

Thank you in advance

Any fiddle or plz enlighten your question

I believe the question was resolved in this thread.

Yes it is already solved.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.