title: Get all ids of multiselect box
body: <p>In this code I can move the options from left to right and from right to left. Now I need to get all the ids from the left box. How do i do that?</p>
  
  <p>JS:</p>
  
  <pre><code>$("#moveright").click(function(){
         $("#country &gt; option:selected").each(function(){
            $(this).remove().appendTo("#planets");
          });
      });
  
  $("#moveleft").click(function(){
       $("#planets &gt; option:selected").each(function(){
         $(this).remove().appendTo("#country");
       });
   });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="cover"&gt;
        &lt;select id="country" multiple="multiple" name="country" &gt;
         &lt;option id="a"&gt;Afghanistan&lt;/option&gt;
         &lt;option id="b"&gt;Albania&lt;/option&gt;
         &lt;option id="c"&gt;Algeria&lt;/option&gt;
         &lt;option id="d"&gt;Andorra&lt;/option&gt;
         &lt;/select&gt;
     &lt;input id="moveright" type="button" value="  &gt;  " /&gt;
     &lt;input id="moveleft" type="button" value="  &lt;  " /&gt;
      &lt;select id="planets" multiple="multiple" name="planets"&gt;
      &lt;/select&gt;
    &lt;/div&gt;
  </code></pre>