hidden columns when javascript disabled
hidden columns when javascript disabled
I'm looking for advice for how to handle hidden columns when javascript is disabled.
When javascript is disabled, I'd still like my static html table to appear properly. This means that columns which are hidden by DataTables should not be visible. I can't simply remove the columns of data from the html entirely or else DataTables will generate errors when javascript is enabled.
Do I need to add a style="display:none" to each and element (yes, I know I can also use a css class) for all columns to be hidden? Is there a preferred or more efficient way to hide a column in the static representation of the table such that DataTables will still work properly when javascript is enabled?
When javascript is disabled, I'd still like my static html table to appear properly. This means that columns which are hidden by DataTables should not be visible. I can't simply remove the columns of data from the html entirely or else DataTables will generate errors when javascript is enabled.
Do I need to add a style="display:none" to each and element (yes, I know I can also use a css class) for all columns to be hidden? Is there a preferred or more efficient way to hide a column in the static representation of the table such that DataTables will still work properly when javascript is enabled?
This discussion has been closed.
Replies
Allan
For what it's worth, I did try adding the style="displaye:none;" to all and elements and that did work properly, but I like & agree with the progressive enhancement approach. Thank you.