title: jQuery UI Dialog - Keeping a clicked link inside an already open jQuery UI Dialog
body: <pre><code>&lt;script type="text/javascript"&gt; 
  $(document).ready(function() {
      $('#mardicion').each(function() {
          var $link = $(this);
  
  
          $link.click(function() {
              var $dialog = $('&lt;div&gt;&lt;/div&gt;')
                  .load($link.attr('href') + ' #content')
                  .dialog({
                      autoOpen: false,
                      title: $link.attr('title'),
                      width: (pageWidth()*0.9),
                      height: (pageHeight()*0.9)
                  });
                  $dialog.dialog('open');
  
                  return false;
          });
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I use the above javascript to load a page when I click a link, the page loads correctly but when I click another link inside the dialog the clicked link opens in the browser window instead of inside the dialog. I've heard that using a click handler is the proper way to do this (that the link opens inside the Dialog), but I'm not sure how to implement it with a  <a href="http://jqueryui.com/demos/dialog/" rel="nofollow">jQuery UI Dialog</a>.</p>
  
  <p>Thanks!</p>