title: Select only not selected combobox jquery
body: <p>code with combobox generate function (working well)</p>
  
  <pre><code>&lt;script&gt;
  $('#combos').on('change', '.combo', function() {
  var selectedValue = $(this).val();
  
  if (selectedValue !== '' &amp;&amp; $(this).find('option').size() &gt; 2) {
  var newComboBox = $(this).clone();
  var thisComboBoxIndex = parseInt($(this).attr('data-index'), 10);
  var newComboBoxIndex = thisComboBoxIndex + 1;
  $('.parentCombo' + thisComboBoxIndex).remove();
  
  newComboBox.attr('data-index', newComboBoxIndex);
  newComboBox.attr('id', 'combo' + newComboBoxIndex);
  newComboBox.addClass('parentCombo' + thisComboBoxIndex);
  newComboBox.find('option[value="' + selectedValue + '"]').remove();
  $('#combos').append(newComboBox);
  }
  });&lt;/script&gt;
  </code></pre>
  
  <p>html and php (working well)</p>
  
  <pre><code>&lt;form id="myForm"&gt;
  &lt;div id="combos"&gt;&lt;select id="combo1" class="combo" data-index="1"&gt;
  &lt;option&gt;&lt;/option&gt;
  &lt;?php
  while($r = mysql_fetch_array($result))
  {
  echo "&lt;option value=\"" .$r['id'] . "\"&gt;".$r['field'] ." ------&lt;/option&gt;";
  }
  ?&gt;
  &lt;/select&gt;
  &lt;/div&gt;
  &lt;input type="button"  id="button_submit" value="Show"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This code should select only the non-selected comboboxes. But is not working. I think is only working for the 1st non-selected value that function found.
  <a href="http://s11.postimage.org/48bdfwb1d/combo.png" rel="nofollow">Please see image</a></p>
  
  <pre><code>&lt;script&gt;
  $('#button_submit').click(function() 
  {
  
  var combo_box_values = $('#combo1 option:not(:selected)').map(function () 
  {
  return parseInt(this.value);
  }).get();
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Question: Is it possible? Where is my code missing? </p>
  
  <p>Cheers</p>
  
  <p><strong>EDIT: source code</strong></p>
  
  <pre><code>&lt;h4&gt;Data Options&lt;/h4&gt;&lt;/center&gt;
  &lt;div id="combos"&gt;&lt;select id="combo1" class="combo" data-index="1"&gt;
  &lt;option&gt;&lt;/option&gt;
  &lt;option value="1"&gt;uptime ------&lt;/option&gt;
  &lt;option value="2"&gt;score ------&lt;/option&gt;
      &lt;option value="3"&gt;gender ------&lt;/option&gt;
  &lt;option value="4"&gt;age ------&lt;/option&gt;
      &lt;option value="5"&gt;angry ------&lt;/option&gt;
  &lt;option value="6"&gt;happy ------&lt;/option&gt;
      &lt;option value="7"&gt;sad ------&lt;/option&gt;
  &lt;option value="8"&gt;surprised ------&lt;/option&gt;
      &lt;option value="9"&gt;location ------&lt;/option&gt;&lt;/select&gt;
      &lt;select id="combo2" class="combo parentCombo1" data-index="2"&gt;
      &lt;option&gt;&lt;/option&gt;
      &lt;option value="1"&gt;uptime ------&lt;/option&gt;
      &lt;option value="2"&gt;score ------&lt;/option&gt;
      &lt;option value="4"&gt;age ------&lt;/option&gt;
      &lt;option value="5"&gt;angry ------&lt;/option&gt;
      &lt;option value="6"&gt;happy ------&lt;/option&gt;
      &lt;option value="7"&gt;sad ------&lt;/option&gt;
      &lt;option value="8"&gt;surprised ------&lt;/option&gt;
  &lt;option value="9"&gt;location ------&lt;/option&gt;&lt;/select&gt;
      &lt;select id="combo3" class="combo parentCombo1 parentCombo2" data-index="3"&gt;
      &lt;option&gt;&lt;/option&gt;
      &lt;option value="1"&gt;uptime ------&lt;/option&gt;
      &lt;option value="4"&gt;age ------&lt;/option&gt;
      &lt;option value="5"&gt;angry ------&lt;/option&gt;
      &lt;option value="6"&gt;happy ------&lt;/option&gt;
      &lt;option value="7"&gt;sad ------&lt;/option&gt;
      &lt;option value="8"&gt;surprised ------&lt;/option&gt;
      &lt;option value="9"&gt;location ------&lt;/option&gt;&lt;/select&gt;
      &lt;select id="combo4" class="combo parentCombo1 parentCombo2 parentCombo3" data-index="4"&gt;
      &lt;option&gt;&lt;/option&gt;
      &lt;option value="1"&gt;uptime ------&lt;/option&gt;
      &lt;option value="5"&gt;angry ------&lt;/option&gt;
      &lt;option value="6"&gt;happy ------&lt;/option&gt;
      &lt;option value="7"&gt;sad ------&lt;/option&gt;
      &lt;option value="8"&gt;surprised ------&lt;/option&gt;
      &lt;option value="9"&gt;location ------&lt;/option&gt;&lt;/select&gt;&lt;/div&gt;
  </code></pre>