title: jquery modal dialog only shows once
body: <p>I know there are multiple posts on this but I still can't get it right.  I've tried so many combinations.  I'm trying to create a dialog box when you click a button.  Inside the dialog box is a form but that is not important for now.  I can get the dialog to show up once but not on the second click.  Here is what I have right now:</p>
  
  <pre><code>var $dialog = $('#cameraform').dialog({
      modal:true,
      autoOpen: false,
      resizable:false,
      width: 625,
      close: function() {
          $(this).remove();
      }
  }); //init dialog
  
  //events            
  $('.addwebcam').click(function(e) {
      $dialog.dialog('open');
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;button class="addwebcam"&gt;Add Webcam&lt;/button&gt;
  &lt;div id="cameraform" title="Add a camera"&gt;
  ...//my form
  &lt;/div&gt;
  </code></pre>
  
  <p>I've also tried initializing the dialog in the click event but that doesn't work at all. What am I doing wrong.</p>