title: resizing tabbed dygraph window
body: <p>I'm using jquery and dygraphs to make a simple page with tabs for each dygraph plot.</p>
  
  <p>When I resize the browser window, the active tab works fine but when I click the other tab the graph doesn't appear.
  If I resize the browser again, the missing graph will appear. I would like both graphs to appear in their respective tabs after resizing the browser once.
  Thanks in advance.</p>
  
  <p><a href="http://jsfiddle.net/scottgeowork/8ELGn/" rel="nofollow">Fiddle: tabbed dygraph</a></p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="profiles"&gt;
    &lt;ul class="tabs"&gt;
     &lt;li&gt;&lt;a href="#graphdiv1"&gt;Profile 7&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href="#graphdiv2"&gt;Profile 8&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
   &lt;div class="tabcontent"&gt;
    &lt;div id="graphdiv1" class="tab"&gt;&lt;/div&gt;
    &lt;div id="graphdiv2" class="tab"&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>* {font-family: 'Segoe UI';}
  .profiles .tabs {list-style: none; margin: 0 10px; padding: 0;}
  .profiles .tabs li {list-style: none; margin: 0; padding: 0; display: inline-block; position: relative; z-index: 1;}
  .profiles .tabs li a {text-decoration: none; color: #000; border: 1px solid #ccc; padding: 5px; display: inline-block; border-radius: 5px 5px 0 0; background: #f5f5f5;}
  .profiles .tabs li a.active, .tabbable .tabs li a:hover {border-bottom-color: #fff; background: #fff;}
  .tabcontent {width: 500px; border: 1px solid #ccc; margin-top: -1px; padding: 10px;}
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>  g1 = new Dygraph(
      // containing div
      document.getElementById("graphdiv1"),
      // CSV or path to a CSV file.
      "Date,Temperature\n" +
      "2008-05-07,75\n" +
      "2008-05-08,70\n" +
      "2008-05-09,80\n"
    );
    g2 = new Dygraph(
      // containing div
      document.getElementById("graphdiv2"),
      // CSV or path to a CSV file.
      "Date,Temperature\n" +
      "2008-05-07,80\n" +
      "2008-05-08,75\n" +
      "2008-05-09,70\n"
    );
  $(document).ready(function(){
      $(".profiles").find(".tab").hide();
      $(".profiles").find(".tab").first().show();
      $(".profiles").find(".tabs li").first().find("a").addClass("active");
      $(".profiles").find(".tabs").find("a").click(function(){
          tab = $(this).attr("href");
          $(".profiles").find(".tab").hide();
          $(".profiles").find(".tabs").find("a").removeClass("active");
          $(tab).show();
          $(this).addClass("active");
          return false;
      });
  });
  </code></pre>