title: Close jquery ui popup with text link
body: <p>I have a problem with the jquery-ui pop up dialog. 
  if i close with default popup close button ok, but if i close with text link then pop up not close.</p>
  
  <pre><code>$(document).ready(function () {
      $('a#popup').live('click', function (e) {
          var page = $(this).attr("href")
          var $dialog = $('&lt;div&gt;&lt;/div&gt;')
  
      .html('&lt;iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"&gt;&lt;/iframe&gt;')
      .dialog({
          autoOpen: false,
          modal: true,
          height: '500',
          width: '85%',
          title: "",
  
          buttons: {
              "Close": function () { 
                  $dialog.dialog('close'); 
                  location.reload();
               }
          },
      });
          $dialog.dialog('open');
          e.preventDefault();
  
      });
  });
  
  
  $("#close").live("click", function (e) {
     alert('hjhhh');
     $dialog.dialog('close');
  });
  
  call from html
  &lt;a id="close" href="#"&gt;close popup&lt;/a&gt;
  </code></pre>
  
  <p>thanks a lot before</p>