2

I'm using footable (http://fooplugins.com/footable-demos/) and I would like to auto-expand all rows when the screen is resized to mobile screen size. Any ideas how to achieve this?

isherwood
  • 58,414
  • 16
  • 114
  • 157
user2667042
  • 53
  • 1
  • 8
  • What does the code for `trigger('footable_expand_first_row')` look like? You may need to duplicate and modify that method. – isherwood Apr 23 '14 at 01:29
  • There is actually a trigger footable_expand_all, but it just was not mentioned in the documents. So $('.footable').trigger('footable_expand_all'); does the trick. – user2667042 Apr 23 '14 at 05:19
  • So $('table').trigger('footable_expand_all'); $('table').bind('footable_breakpoint', function() { $('table').trigger('footable_expand_all'); }); does the trick. I can't yet answer my own question as I don't have enough reputation :) – user2667042 Apr 23 '14 at 05:43

1 Answers1

3
$('table').trigger('footable_expand_all');

$('table').bind('footable_breakpoint', function(){ 
    $('table').trigger('footable_expand_all'); 
    }); 

does the trick.

Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
user2667042
  • 53
  • 1
  • 8