title: jQuery refresh var from different functions
body: <p>Let's say I got this code:</p>
  
  <pre><code>&lt;div id="mydiv"&gt;&lt;/div&gt;
  &lt;div id="click"&gt;click&lt;/div&gt;
  
  &lt;script language="javascript" type="text/javascript"&gt;
  var time = new Date().getTime();
  
  function jo(){
      $('#mydiv').html(time);
  }
  
  $("#click").click(function(){
      jo();
      time.refresh();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>As you can see I try to refresh the var <code>time</code> from a function (click) with <code>time.refresh();</code> but it's not working. How could I do this? PS: I dont really need the current second onclick it's just an example</p>