How to hide a Table Column with jQuery
One of the things I mostly need is a way to hide a table column fron view.
Lastly I have found how to do it with one line on jQuery code and the usage is simple.
$(document).ready(function() {
$('#btnHide').click(function() {
$('td:nth-child(2)').hide();
// if your table has header(th), use this
//$('td:nth-child(2),th:nth-child(2)').hide();
});
});
Thanks for that code to Suprotim Agarwal at DevCurry.com
Leave a Reply