title: let the user sort with selectboxes
body: <p>I have a unknown select-boxes as I use to let the user to be able to sort rows saved in a table. In this example I let the user sort his favorite color:</p>
  
  <p><a href="https://jsfiddle.net/rutnceL7/2/" rel="nofollow noreferrer">https://jsfiddle.net/rutnceL7/2/</a></p>
  
  <pre><code>Orange
  &lt;select name="nr[]" onchange="sortselect(this.id);"&gt;
  &lt;option value="1" selected&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;Green
  &lt;select name="nr[]" onchange="sortselect(this.id);"&gt;
  &lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2" selected&gt;2&lt;/option&gt;
  &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;Blue
  &lt;select name="nr[]" onchange="sortselect(this.id);"&gt;
  &lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;option value="3" selected&gt;3&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;
  </code></pre>
  
  <p>Is it possible to use pure Javascript (or Jquery,but I prefer Javascript) to make this happen:
  - The user takes green (2. place) and change it to first place.
  - Then the javascript should find where the first place is and change that one to second place (because green was 2. before)</p>
  
  <p>So in a way it switches the number the user choose. Is this possible in a simple way?</p>
  
  <p>I have tried to search on google (and stackoverflow), but have not found anything. I dont like you to do the programming, but I dont know where to start.</p>