title: refresh content of a jquery ui dialog
body: <p>i managed to to get this script. It's refreshing the div of the dialog window:</p>
  
  <pre><code>function getRandom() {
  $("#category_dialog").load("&lt;?php echo $category; ?&gt;", '', callback);
  </code></pre>
  
  <p>}</p>
  
  <pre><code>function callback() {
      $("#category_dialog").show("fast");
      setTimeout("getRandom();", 10000);
  }
  
  $(document).ready(getRandom);
  </code></pre>
  
  <p>everything works fine. div gets refreshed every 10 seconds. But i have some doubts about this method.
  1. since is doing a refresh at any 10 seconds will slow down the speed of the borwser or something like this? 
  2. I would like to make it refresh more faster at every 3 seconds could anything bad happen? </p>
  
  <p>I would prefer to make somehow a link that will refresh the content onclick -- but i couldn't find any good examples. Can someone help me out with this. 
  So i want the category_dialog div be loaded using load.() but with onclick call -- and display then whats new. 
  Thanks!</p>
  
  <hr>
  
  <p>With Kissaki help i managed to make a simple function that will make me a refresh link :)
  here's the sample:</p>
  
  <pre><code>$(function() {
    $("#refresh").click(function() {
       $("#category_dialog").load("&lt;?php echo $category; ?&gt;")
    })
  })
  </code></pre>