when a function's work is completed
<p>I'm using a jQuery plugin, it gets data from an url, fetches, calculates and writes some data in a <code>div</code>.</p>

<p>I want to copy this <code>div</code> contents to another <code>div</code>, when that functions do its work.</p>

<p>for example:</p>

<pre><code>$("#div1").myfunction(); // it gets and calculates data and adds to #div1 . it needs 2-3 seconds to be done
var contents = $("#div1").html(); // when myfunction() done, copy contents
$("#div2").html(contents);
</code></pre>

<p>when i ran that code, i didn't have new contents in <code>#div2</code>.</p>
