Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Alternatively, change the css of the tab content class to...</p> <pre><code>.tab_content { display:block; visibility:hidden; } </code></pre> <p>... and add the following added lines (under the //HACK!!! ... ) to your jscript.js file..</p> <pre><code> $(document).ready(function() { // When user clicks on tab, this code will be executed $("#tabs li").click(function() { // First remove class "active" from currently active tab $("#tabs li").removeClass('active'); //HACK!!! As the tabs_content HAS to initially be set to display:block in order for the flot graphs to be plotted correctly, // we need to manually change the visibility attribute for the tabs_content each time another tab is selected as active. //This assigns a variable to the tab_content of the currently active tab and changes the css visibility attribute to hidden. var old_tab = $("#tabs li").find("a").attr("href"); $(old_tab).css('visibility', 'hidden'); // Now add class "active" to the selected/clicked tab $(this).addClass("active"); // Hide all tab content $(".tab_content").hide(); // Here we get the href value of the selected tab var selected_tab = $(this).find("a").attr("href"); //HACK!!! Change the css visibility attribute of the newly selected tab to visible $(selected_tab).css('visibility', 'visible'); $(selected_tab).fadeIn(); return false; }); }); </code></pre> <p>... and providing your aspx looks like ...</p> <pre><code> &lt;div id="tabs" &gt; &lt;ul id="Ul1" &gt; &lt;li class="active"&gt;&lt;a href="#tab1"&gt;Main&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab2"&gt;tab2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab3"&gt;tab3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab4"&gt;tab4&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tab5"&gt;tab5&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div style="width:100%;float:left;"&gt; &lt;div id="tabs_content_container"&gt; &lt;div id="tab1" class="tab_content" style="visibility:visible"&gt; content for tab 1 &lt;/div&gt; &lt;div id="tab2" class="tab_content" &gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>... your flot graphs will display correctly and when the relevant tab is selected!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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