Mobile Responsive expand one row and collapse all other rows

Mobile Responsive expand one row and collapse all other rows

Jerald16Jerald16 Posts: 7Questions: 3Answers: 0

Hello,

I'm using mobile responsive details renderer (https://datatables.net/reference/option/responsive.details.renderer ), by the way thanks for this plugin. But in this case, Its there any way to "Expand one row and Collapse all others row"?

Thanks you for your help.

Answers

  • Jerald16Jerald16 Posts: 7Questions: 3Answers: 0
    edited March 2018

    Hi,

    I got the solution for this but not the real way. Here's the code for the reference. If anyone know the best way please feel free to comment here. :smile:

    jQuery(".details-control").each(function() {
        jQuery(this).click(function(){
            table.rows('.parent').nodes().to$().find('.details-control').not(this).trigger('click');
        });
    });
    
This discussion has been closed.