Basic action on click
<p>For some reason, I can't get jQuery to do what I want it to do.</p>

<p>What I need is for the container div to disappear when one of its children is clicked.</p>

<p>Here's example HTML</p>

<pre><code>&lt;div id="container"&gt;
 &lt;a href="link"&gt;
  &lt;div id="child1"&gt;
   When this is clicked, #container disappears,
   including everything contained inside...
  &lt;/div&gt;
 &lt;/a&gt;

 &lt;a href="link"&gt;
  &lt;div id="child2"&gt;
   ...or when this one is clicked
  &lt;/div&gt;
 &lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>Here's what I've tried.</p>

<pre><code>$("#child1").click(function () { 
  $(#container).hide(); 
});
</code></pre>

<p>and</p>

<pre><code>$("#child1").click(function () { 
  $(#container).fadeOut("fast"); 
});
</code></pre>

<p>Thanks in advance.</p>
