Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controls won't get appropriate dimensions in jQuery tab

I'm using the ui-tabs of jQuery. If I open a tab which was closed on page-load, the sub-controls in this tab won't have the full width of the tab. That's because closed tabs get the class ui-tabs-hide and this has display set to none.

Is there an easy way to handle this? I've already tried to use visibility hidden instead of display none, but this will wrap my tab-contents below each other.

like image 932
Alexander Schmidt Avatar asked Dec 07 '22 17:12

Alexander Schmidt


1 Answers

Try rendering the contents of your tabs (or initializing the controls in them) when they are shown for the first time. You can use the "show" event for this.

like image 87
Ates Goral Avatar answered Dec 10 '22 11:12

Ates Goral