filamentgroup / tablesaw

A group of plugins for responsive tables.
MIT License
5.48k stars 434 forks source link

Tablesaw with Ajax loaded tabs #161

Closed jeesus closed 8 years ago

jeesus commented 8 years ago

Hey

I'm using Bootstrap tabs with Ajax loaded content (http://plugins.krajee.com/tabs-x#events to be exact). Unfortunately the tablesaw isn't working on any of the tabs. I've been trying to reload scripts on successful load of the ajax call, included the Tablesaw js to the specific files that are being loaded and so on, but can't figure out a workaround.

Any ideas?

Also, the page keeps flickering a lot when I use Tablesaw with tabs.

jeesus commented 8 years ago

Okay, found a way. Added following code to Tabs event when tab is loaded successfully: $( document ).trigger( 'enhance.tablesaw' );

zachleat commented 8 years ago

Yes! I’ve added a bit more documentation about this here: https://github.com/filamentgroup/tablesaw#manual-initialization-of-tablesaw-components

Thanks!