consolidate table td and th query
A comma.

$('table tr td:nth-child(' + rowNumber + '), table tr th:nth-child(' + rowNumber + ')').toggle();


jQuery's selectors are the same as CSS (with some stuff added here and there), so all the usual CSS selector rules apply:

$("div, h1")  // select div and h1 elements
$("div h1")   // select h1 elements that are nested somewhere within a div
$("div &gt; h1") // select h1 elements that are direct descendants of a div


Etc.

By the way, rowNumber doesn't make sense; the code will select a given column, not a row.