Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Tabs Content Overflow + heightStyle and refresh break tabs
    text
    copied!<p>I am using jQuery-UI Tabs vertically at <a href="http://hr.barton.s483.sureserver.com/tool_new1b.php" rel="nofollow">my site</a> and was having no issues until I started loading content in the tab panels and found that the parent tab panel div does not grow with the content, e.g. tab "Static Info". I can "fix" the issue by setting the parent div class CSS to <strong>overflow: auto</strong>, which then creates a vertical scrollbar on the parent div. However, I would really prefer if the parent div would just grow with the child content. I did try a couple of clearfix options, including:</p> <p><code>$( ".tabs" ).tabs().addClass( "ui-helper-clearfix" );</code> </p> <p>when intializing the document, but none of the clearfixes made any difference. As I was seeking solutions, I did try adjusting the heightStyle and tab refresh to see if either of those would make a difference. What I found was that this did nothing:</p> <p><code>$( ".tabs" ).tabs({ heightStyle: "fill" });</code> I also tried "content" and "auto" with also no luck.</p> <p>However, when I tried the alternative as documented at api.jquery.com/tabs:</p> <pre><code>var heightStyle = $( ".tabs" ).tabs( "option", "heightStyle" ); $( ".selector" ).tabs( "option", "heightStyle", "fill" ); </code></pre> <p>the tabs layout completely broke. The content was all there, but the ul list was at the top of the page with no tabs, followed by all the panel content. I got the same result with:</p> <p><code>$( ".tabs" ).tabs( refresh );</code> </p> <p>I did verify that my jQuery UI in general was working (e.g. I tried </p> <pre><code>$( ".tabs" ).tabs({ event: "mouseover" }); which worked fine. </code></pre> <p>This seems like it should be simple, but I've reached a relative dead end with CSS, and I don't understand what is going on with the jQuery- why it breaks with heightStyle and refresh. Any ideas or advice on getting my content to behave itself are very much appreciated... thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload