title: Remove DIV on Click
body: <p>I have a DIV which I want to be removed when I click a link contained inside that DIV. Here is what I have:</p>
  
  <pre><code>&lt;div id="clients-edit-wrapper"&gt;
      &lt;div class="close-wrapper"&gt;
          &lt;a href="#" class="close-div"&gt;Close&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I click "Close" I want <code>clients-edit-wrapper</code> to be removed. I'm looking for a way to do this by referencing the parent DIV of the Close link which, in this case, is <code>clients-edit-wrapper</code>. </p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <hr>
  
  <p>Answer from Huangism below:</p>
  
  <pre><code>$('.close-div').click(function(){
     $(this).parent().parent().remove();
  });
  </code></pre>
  
  <p>This only works if the element you would like to remove is two parents up. In my case, this is exactly what I needed.</p>