I want to select td and th of a table. At the moment I only can select td or th. How can I make this shorter?
$table.find('tr th:nth-child(' + colIndex + ')').css('color', 'red');
$table.find('tr td:nth-child(' + colIndex + ')').css('color', 'red');