Re-run jquery script when ajax call is made
<p>I have a jquery float box plugin. The document is loaded and on a buttonpress an ajaxcall triggers box.php which parse the box <code>#floating-box</code> to be floated (the box is then showed on alla pages from now on). The problem is that the script which is within <code>$(document).ready(function(){..</code> does not find the box (if I refresh it works so the scipt is OK). I am novice but I guess this could be solved with some kind of <code>live</code>solution. Can someone guide me  in the right direction?</p>

<p>start of jquery script. the script works so the whole script itself is not of interest, rather how to re-run it when box.php have parsed the box <code>#floating-box</code> but still to run it on every document load since the box appears on all pages from now on and needs to float on them too.</p>

<pre><code>var $floatingbox = $('#floating-box');

if($('#floating-container').length &gt; 0){..
</code></pre>
