Hi @tobiasbg @stfa76 @travishalff
I had a similar problem: I wanted that if the screen is not wide enough to show all the columns, than all of them had to be collapsed.
So starting form this post, this page and this other one, I’ve found a solution adding this code in the additional parameters line:
columnDefs: [ {targets: 'sorting_disabled', className: 'min-tablet-l'}]
It applies the class “min-tablet-l” to all the TH tags so they will force the collapse to screen resolutions lower than 768.
To apply it to just some column, “sorting_disabled” could be replaced with “column-5” an so on.
Maybe it is not too “clean”, but it seems working 🙂
Nadia
Hi Nadia,
interesting approach! Thanks for sharing this!
Best wishes,
Tobias
@stfa76
Were you successful in hiding the columns you wanted to? I am having the same issue (table with 12 columns, I want to hide the last 6).
Hi,
basicbruce72: Do you mean hiding when the collapse
mode is active?
Regards,
Tobias
@tobiasbg
That’s right. I want certain columns visible, then clicking on the + shows the other ones. The table is here: http://oa-ottawa.ca/find_a_meeting/
Hi,
unfortunately, I don’t know an easy solution for that 🙁 I’m not too familiar with this and can only suggest taking a look at the examples like https://wordpress.org/support/topic/defining-columns-to-collapse-1?replies=12 or https://wordpress.org/support/topic/collapse-extension-breaking-point?replies=6
Regards,
Tobias
Hi Tobias,
do you have an idea why, while in mobile view, sometimes 2 of my columns collapse, and sometimes just 1? I would like to make sure that 2 columns collapse at all times (in mobile view).
URL: http://slyvago.lt/reprezentacine-svetaine-detaliai/
Hi,
as you now have opened a new thread at https://wordpress.org/support/topic/not-all-columns-collapse/, I will reply there, as soon as possible.
Regards,
Tobias