• Resolved Live4TheRisk

    (@live4therisk)


    I have downloaded the Responsive Tables Plugin and it seems to be working.

    I have added the following code:
    [table id=123 responsive=collapse responsive_breakpoint=phone /]

    I’d like to collapse the table for mobile only, but would like to choose which columns should be shown and which should collapse.

    Is there any way to specify which columns to show and collapse?

    https://wordpress.org/plugins/tablepress/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Yaara

    (@yaaraher)

    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 ] } ]

    Yaara

    (@yaaraher)

    Alright, solved it by going the other way around:
    "columnDefs": [ { "className": "none", "targets": [ 5, 6, 7, 8 ] } ]
    Cheers!

    Plugin Author TobiasBg

    (@tobiasbg)

    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/

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Defining Columns To Collapse’ is closed to new replies.