HTML:
<table class="list qy">
<tr>
<td>cell1</td>
<td class="q">cell2</td>
<td>cell3</td>
<td class="y">cell4</td>
</tr>
</table>
CSS:
table.qy td.q, table.qy td.y { display: none; }
JS:
function toggleQY(b) {
$("table.list").toggleClass("qy")
}
It's more efficient than using JavaScript to hide all TD elements individually ($("table.list td.q,table.list td.y")...), however, it doesn't work in Internet Explorer versions 8 and 9.
It seems that the class is added to the table, but the table does not refresh...
I'm at a loss for solutions (((
P.S. Please excuse any mistakes in my English