Adding/Removing/Updating options from select inputs
<p>Here is what I've started to do: <a href="http://jsfiddle.net/nd9ny/" rel="nofollow">http://jsfiddle.net/nd9ny/</a></p>

<p>For now it doesn't work as I want it to.</p>

<p>I want to update options each time when a new select input is added or an input is removed.</p>

<p>For example, we have our first select input with these options:</p>

<pre><code>&lt;select&gt;
    &lt;option value="1"&gt;&lt;/option&gt;
    &lt;option value="2"&gt;&lt;/option&gt;
    &lt;option value="3"&gt;&lt;/option&gt;
    &lt;option value="4"&gt;&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>When I add new input to my page, I want my function to update all the inputs and to remove the newly selected option from them.</p>

<pre><code>&lt;select&gt;
    &lt;option value="1" selected&gt;&lt;/option&gt;
    &lt;option value="3"&gt;&lt;/option&gt; // The second one is removed
    &lt;option value="4"&gt;&lt;/option&gt;
&lt;/select&gt;

&lt;select&gt;
    &lt;option value="2" selected&gt;&lt;/option&gt; // The first one is removed
    &lt;option value="3"&gt;&lt;/option&gt;
    &lt;option value="4"&gt;&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>And then, If I remove the first input, the second one becomes:</p>

<pre><code>&lt;select&gt;
    &lt;option value="1"&gt;&lt;/option&gt;
    &lt;option value="2" selected&gt;&lt;/option&gt;
    &lt;option value="3"&gt;&lt;/option&gt;
    &lt;option value="4"&gt;&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Pure Javascript code needed.</p>
