Hidden Columns

Hi Experts,

Is it possible within a HTML table to have a group of columns hidden using a CSS class that would contain some info for my JS, or would it be better to build a completely separate table within a div, because the user table must be a specific width?

Thank you
APD TorontoAsked:
Who is Participating?
 
Rainer JeschorCommented:
Hi,
do you want to hide a complete column? Should the user be able to show the column again?
What kind of JavaScript do you use? Plain, jQuery, ...?
There is a jQuery plugin called datatables.net which has also an extension to select the visible columns.
Sample here:
http://jsfiddle.net/EE_RainerJ/0juf88yh/
or
http://www.datatables.net/extensions/colvis/
The jsFiddle is not yet perfect in the styling but should give you some idea.

HTH
Rainer
0
 
Marco GasiFreelancerCommented:
Forgive me, but your question sounds strange to me. If your JS needs some data you can put them where you want accordingly to your JS or you can edit your JS to make it find your data wherever they be.
Anyway, I'd choose to build another table or another container (depending on the nature of the data and the code of the JS). Since tables goal is to show data to the user and since you want those date are hidden to the user, you can use whatever container you're more comfortable with to hold them.
0
 
Steve BinkCommented:
To expand on a point implied by Rainer Jeschor's comment, if the data will *always* be hidden, why not create these data points solely within Javascript?  There's no need to have elements on the page if they will never be used.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.