title: Simple Jquery Dialog but now on click
body: <p>I tried making a dialog using jquery it works but I have no succes at doing it onclick bacuse it should not just popup but only when you click on it.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt; 
  $.ui.dialog.defaults.bgiframe = true;
  $(function() {
      $("#dialog").dialog();
  });
  &lt;/script&gt;  
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;div id="dialog" title="Basic dialog"&gt;
      &lt;p&gt;hi how are you&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and for the nice looking button</p>
  
  <pre><code>&lt;button id="create-user" class="ui-button ui-state-default ui-corner-all"&gt;Profiel Matthijs&lt;/button&gt;
  </code></pre>
  
  <p>tried using these examples </p>
  
  <p><a href="http://jqueryui.com/demos/dialog/" rel="noreferrer">http://jqueryui.com/demos/dialog/</a><br>
  <a href="http://jqueryui.com/demos/dialog/#modal-form" rel="noreferrer">http://jqueryui.com/demos/dialog/#modal-form</a></p>
  
  <p>anyone know how to get this working with an click on the #create-user button
  i am not so good at javascript.</p>
  
  <p>Thanks
  Matthy</p>