How to add a new element after the script that invoke this function?
<p>I have a page that call a script such as :</p>

<pre><code>&lt;script src="http://www.mypage.com/widget/script.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p>inside this script I get the current "script" on execution, with :</p>

<pre><code>var scripts = document.getElementsByTagName('script');
var myScript = scripts[scripts.length - 1];
</code></pre>

<p>now, what I'd like to do, is to add after this "element" (I mean, after the script in my calling page) a new one, such as :</p>

<pre><code>&lt;div&gt;New Element&lt;/div&gt;
</code></pre>

<p>so the final result in my page will be :</p>

<pre><code>&lt;script src="http://www.mypage.com/widget/script.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;div&gt;New Element&lt;/div&gt;
</code></pre>

<p>how can I do it? I think I'll wrap <code>myScript</code> with jquery, but don't know how to add a new element after this one in the DOM.</p>
