Dynamically adding a script/function block in jquery
<p>EDITED:</p>

<p>Just wondering if is it possible to add a function (or static script) block or a variable to body of html.</p>

<p>Something like this,</p>

<pre><code>$('body').add(function(){/../}) 
</code></pre>

<p>or</p>

<pre><code>$('body').append('&lt;script&gt;&lt;/script&gt;')
</code></pre>

<p>or</p>

<pre><code>$('body').fn.myFunc = function(){}
</code></pre>

<p>Is it correct to use .extend instead?</p>

<p>One example is if I use ExternalInterface, my callbacks have to be statically defined in body/html/js but not in $().ready function unless I have a var defined globally and refer it in $().ready function.</p>

<p>I overlooked this requirement, and thats where I wanted to add dynamic callback functions.</p>
