title: Jquery action within a div to control another with load()
body: <p>I have an index page <code>index.php</code>, and when the user clicks on a project (for the sake of this question, lets say that project is contained on an html page called <code>aeffect.html</code>), it loads <code>aeffect.html</code> into a div: </p>
  
  <pre><code>&lt;div id="popupContainer"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>which is contained oncontained on <code>index.php</code>. </p>
  
  <p>However, there are many projects on <code>index.php</code>, and each of these projects has a close button. I tried to use this variable to empty out <code>popupContainer</code> in hopes that it would reset it to empty, and <code>aeffect.html</code> would dissappear.</p>
  
  <pre><code>//Close property
  $("a.close").click(function(){
      $("#popupContainer").empty();
  });
  </code></pre>
  
  <p>This doesn't seem to work, I am not exactly sure how to make this work. Is there a way to make it so that the action from <code>aeffect.html</code> can control the div on <code>index.php</code>?</p>
  
  <p>Here is the full jquery:</p>
  
  <pre><code>$(document).ready(function() {
  //Find &amp; Open
  $(".projectThumb").click(function(){
          $("#popupContainer").load("/aeffect.html");
              });
  
  //Close property
  $("a.close").click(function(){
      $("#popupContainer").empty();
          });
  });
  </code></pre>
  
  <p>Here is the html for index.php</p>
  
  <pre><code>&lt;div id="container"&gt;
      &lt;div class="projectThumb"&gt;
      &lt;img src="/img/aeffect_button_static.gif" width="146" height="199" class="button" name="aeffect" alt="" /&gt;
      &lt;p class="title"&gt;A.EFFECT: Film Poster&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="popupContainer"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and the html for aeffect.html</p>
  
  <pre><code>&lt;div class="projectPopup" id="aeffect"&gt;
      &lt;a class="close"&gt;Close &amp;times;&lt;/a&gt;
      &lt;img src="/img/aeffect_popup.jpg" width="500" height="729" alt="" /&gt;
      &lt;p class="description"&gt;Description&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>