my6solutions

asp .net, the social web & other distractions

 

Running Apps


PayPal - The safer, easier way to pay online!

Disclaimer

I am in no way affiliated with Microsoft or Google. I am just another developer trying to make a difference. All opinions and observations are usually my own.

Iframe content not displaying or rendering in hidden jquery UI Tab

While developing the new UI for Raya, I noticed that gadgets were not displaying if they rendered in a hidden tab. The first thing I checked was jquery UI's Tab documentation (jquery UI 1.7.2). Lo and behold there was a short paragraph describing this issue and a solution was also given... phew. 

The paragraph is duplicated here to save you time...

Any component that requires some dimensional computation for its initialization won't work in a hidden tab, because the tab panel itself is hidden via display: none so that any elements inside won't report their actual width and height (0 in most browsers).

There's an easy workaround. Use the off-left technique for hiding inactive tab panels. E.g. in your style sheet replace the rule for the class selector ".ui-tabs .ui-tabs-hide" with

.ui-tabs .ui-tabs-hide { position: absolute; left: -10000px; }

And that's all that was needed to fix the non display issue.

 

Bookmark and Share

Permalink | Comments (0) | Post RSSRSS comment feed

Comments