title: jQuery onclick have to click twice for pop-up to appear, Why?
body: <p>Hi I have two related problems, i created a pop-up box that appears after a link is clicked however you have to click twice for it to appear and Im not sure why?</p>
  
  <p>Also I can collect the id of the link that was clicked upon and then retrieve that corresponding information from the database however if i click another link it still shows the first links information. I think what I need to do is empty the id variable when the box is closed however again I've tried loads of things and am not sure how to do this either?</p>
  
  <p>Any help would be greatly appreciated the code is shown below,</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var myCallback = function(caller){
      var linkID = caller.id; 
      caller.rel ="gb_page_center[1020, 550]";
      caller.href = "species/butterfly.php?linkID="+linkID;
      var calling = caller.href;
  
      $(document).ready (function() {
          $('.descript').click(function(event) {
              $('#popup').css('display','block');
              $('#popup').empty();
              $('#popup').load(calling);
          })
      });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The link is below:</p>
  
  <pre><code>&lt;span id="11" class="bluebells descript"  title="Bluebells (click me)"  onclick="myCallback(this);" &gt;&lt;/span&gt;
  </code></pre>
  
  <p>Thanks!</p>