title: Pop-up window scrolls back to the top when closed
body: <pre><code>/*CSS */  
  #popup { background-color: #fff; border: 1px #000 solid; display: block; position: fixed; padding: 20px; top: 200px; left: 50%; margin-left: -300px; width: 600px; z-index: 1; }
  
  /* JQuery */
  $('#show-popup').live('click', function() 
      {
          var tempWindow = $('&lt;div id="popup"&gt;This is a draggable pop-up window created with JQuery and JQuery UI &lt;a href="#" id="popup-close"&gt;Close&lt;/a&gt;&lt;/div&gt;').draggable();
          $('body').append(tempWindow);
      });
  
  $('#popup-close').live('click', function()
  {
      $(this).parent().remove();
  });
  
  /* HTML */
  &lt;a href="#" id="show-popup"&gt;Open popup window&lt;/a&gt;
  </code></pre>
  
  <p>The pop-up works, it opens normally, you can drag it around the page and it sticks to its position, but when you close it, it scrolls back to the top of the page. How can I prevent this?</p>