jellekralt / Responsive-Tabs

Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.
http://jellekralt.github.io/Responsive-Tabs/
MIT License
531 stars 228 forks source link

FOUC on tabs with a lot of content #145

Closed RobbieLensen closed 6 years ago

RobbieLensen commented 6 years ago

Hi there,

I have noticed that when you have a large number of tabs with a lot of content in them the page has a Flash Of Unstyled Content (FOUC) because the plug-in just takes a bit of time before styling all the content.

Would there be a way to detect when the plugin has finished loading (maybe a promise return?) so it can be hidden until all styles are applied?

jellekralt commented 6 years ago

You could use the load() option for this: https://github.com/jellekralt/Responsive-Tabs#load

RobbieLensen commented 6 years ago

That did the trick indeed, good stuff!

Thanks again!