JQuery update javascript snippet
<p>The scenario is that I'd like to update a javascript snippet (that renders a widget) when a user clicks a button.</p>

<p>The idea is that a user can enter a number of parameters to configure their widget and then click a button to see a preview of it.</p>

<p>Is there a way to do this via jquery?</p>

<p>The snippet would look something like this:</p>

<pre><code>&lt;script type="text/javascript"&gt;&lt;!--
var yoc_w_frame = "SiteName";
var yoc_home = "HomePath";
var yoc_w_width = 300;
var yoc_w_height = 250;
//--&gt;&lt;script&gt;
&lt;script type="text/javascript" src="http://domain.com/js/js.js"&gt;&lt;/script&gt;
</code></pre>

<p>I tried <code>$("#divTest").append( script );</code> where script is a var that holds the built up script string.</p>
