title: jQuery UI dialog onClick event
body: <p>i'm trying to open a dialog box with an onclick command, but i'm having no luck whatsoever. I've tried everything and I just can get it to work.</p>
  
  <p>Here the dialog jQuery:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          $(function runDialog(){
              $('#testimonialOpen').dialog({
                  autoOpen:false
                  });
              })
      &lt;/script&gt;
  </code></pre>
  
  <p>There is a div id'd testimonialOpen so I know it's selecting the element, and the dialog box works when the autoOpen is removed, however, when I try and call the function like this:</p>
  
  <pre><code>&lt;p class="topper"&gt;Top words&lt;a onClick="runDialog()"&gt;&lt;img id="readMore" style="display: inline; padding-left:40px;" src="../images/content/readMore.png"/&gt;&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p>It just does nothing. I tried to use the 'open' command in the jQuery but it still does nothing, any ideas?</p>