Actually I wanted columns 1-5 to be visible, so this is the code I added:
"columnDefs": [ { "className": "all", "targets": [ 0, 1, 2, 3, 4 ] } ]
Alright, solved it by going the other way around:
"columnDefs": [ { "className": "none", "targets": [ 5, 6, 7, 8 ] } ]
Cheers!
Hi,
yes, that logic can be weird sometimes. Good to hear that you found a solution! 🙂
Best wishes,
Tobias
Hi Tobias,
I’ve added the php code in tablepress-responsive-tables.php. and then I added the
“columnDefs”: [ { “className”: “all”, “targets”: [ 0] } ] in the custom commands.
I want to show first column only and the rest collapse, but in mobile, the table still show the other columns. Please see what you can help.
http://suzy.hk/psasm%E8%AA%8D%E5%8F%AF%E4%BC%81%E6%A5%AD%E5%90%8D%E5%96%AE/?lang=zh-hant
Thanks
Hi TobiasBg,
I did the same thing but my table is not working I tried
"columnDefs": [ { "className": "all", "targets": [ 0, 1, 2] } ]
my website is http://139.59.71.204/test/