//Toggle any particular <td> column from the <table> table. Visibility property of the CSS ie being used here. You can also use the display property, if you want
//to save the space on the webpage.
//Over here you have to pass the html table id, column id and the visibility state.
function ToggleColumn(tblId, tdId, visState) {
$('#' + tblId + ' tr').each(function() {
$(this).find('td[id*="' + tdId + '"]').css("visibility", visState); //Attribute Contain Selector ([id*=) used for id value.
}); } Use:-
ToggleColumn('tblCat', 'tdCatReq', 'hidden');
ToggleColumn('tblCat', 'tdCatReq', 'visible');