Vanilla JS plugin template
<p>Okay, we all know how to write jQuery plugins: <a href="http://docs.jquery.com/Plugins/Authoring" rel="nofollow">http://docs.jquery.com/Plugins/Authoring</a></p>

<p>Can someone advise pure javascript template plugin? With methods and default settings.</p>

<p>I want to make it work with single node and <strong>with node array</strong> (<code>querySelectorAll</code>)</p>

<p>Something like this:</p>

<pre><code>var PliginName = function(selector){
    ...
}
</code></pre>

<p>And call it like this:</p>

<pre><code>var dropdown = new PluginName('.dropdown');
</code></pre>

<p>And be able to close all dropdown like this:</p>

<pre><code>dropdown.close();
</code></pre>
