Hide/Show table columns?

N

Noozer

Just wondering if it's possible to hide and show columns in a table without
actually reloading the page?

I know that scripting can alter the CSS properties to hide/show rows, but is
it possible do the same thing with a column?

Thx!
 
K

Kris

Noozer said:
Just wondering if it's possible to hide and show columns in a table without
actually reloading the page?
Yes.

I know that scripting can alter the CSS properties to hide/show rows, but is
it possible do the same thing with a column?

There are probably more easy ways, but I find it comfortable enough to
replace a class value on relevant table cells and have the effect for
that class value defined in a stylesheet.

..hidden {
display: none;
}

<td class="foo">Bar</td>

Any clever client side script can add another class "hidden" to all the
element that have a class of "foo" when any particular event occurs,
like the push of a button. Don't ask me to write one on the spot though.
 
N

Noozer

Just wondering if it's possible to hide and show columns in a table
without
There are probably more easy ways, but I find it comfortable enough to
replace a class value on relevant table cells and have the effect for
that class value defined in a stylesheet.

.hidden {
display: none;
}

<td class="foo">Bar</td>

Any clever client side script can add another class "hidden" to all the
element that have a class of "foo" when any particular event occurs,
like the push of a button. Don't ask me to write one on the spot though.

Answers my question well! I was hoping to be able to treat a column as a
single entity, but I can deal with classing the individual cells.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top