Javascript plugin creation methods
<p>I want to create a plugin 'myPlugin' which simply add some text to a div. like:</p>

<pre><code> document.getElementById('testDiv').myPlugin("this is a text");
</code></pre>

<p>how can I achieve this through singleton method as well as prototype method ?</p>
