title: Click() jQuery function not working on a simple div
body: <p>I'm trying to get a simple <code>click()</code> method to work when clicking on a certain div. I've looked at numerous threads but haven't been able to find a solution. Here's my jQuery code:</p>
  <pre class="lang-js prettyprint-override"><code>var $Chart = $('#Chart');
  var $TopBlock = $('#TopBlock');
  
  $Chart.hover(function() {
      //Top Block
      $TopBlock.hover(function() {
          $(this).fadeTo('fast', 1);
          $MiddleBlock.fadeTo('fast', .5);
          $BottomBlock.fadeTo('fast', .5);
      });
  
      $TopBlock.click(function() {
          alert(&quot;click handler called&quot;);
      });
  });
  </code></pre>
  <p>And relevant HTML code:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div id = &quot;Chart&quot;&gt;
      &lt;div class = &quot;Block&quot; id = &quot;TopBlock&quot;&gt;
          &lt;div class = &quot;Group&quot; id= &quot;Capstone&quot;&gt;
              &lt;p&gt;Capstone&lt;/p&gt;
          &lt;/div&gt;
          &lt;!-- Capstone --&gt;
          &lt;div class = &quot;Competency&quot; id = &quot;CapstoneComp&quot;&gt;
              
          &lt;/div&gt;
          &lt;!--Expansion--&gt;
          &lt;div class = &quot;Expand&quot; id= &quot;CapstoneExpand&quot;&gt;
              
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I included the top hover function because it works on its own. However, when I add in the click function, everything breaks, including the hover function. I tried moving the click function outside of the <code>$TopBlock</code> hover, but everything broke also. It should be a simple click function here, I really don't know why this isn't working.</p>
  <p>EDIT: Sorry for the lack of relevant material. First time poster here. The problem is that the <code>click()</code> function is not firing when I click on my <code>$TopBlock</code> div. It is supposed to trigger some JavaScript code that will increase the dimensions of my <code>#Expansion</code> div, but I just want the alert to pop up first to ensure that its working.</p>