title: Check toggle state
body: <p>I want to check a toggle state. When I check the console log of my browser, the visible value is true and doesn't change to false.</p>
  
  <p>Why is this happening? And how can I fix it?</p>
  
  <hr>
  
  <pre><code>&lt;html&gt; 
  &lt;head&gt;
  &lt;script src='~/Scripts/jquery-1.4.1.min.js' type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
          $(function () {
  
              $('#divUpdateForm').click(function () {
  
                  $('#divUpdateContent').slideToggle();
  
                  console.log($('#divUpdateContent').is(":visible"));
  
              });
          });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="divUpdateForm" runat="server" class="panel" &gt;Update panel state&lt;/div&gt;
  
  &lt;div id="divUpdateContent" runat="server"&gt;
  ... my content
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>