title: Unselect an option using jQuery on a Bootstrap selectpicker
body: <p>I am using Bootstrap for some UI elements: SelectPicker which allows a user to select multiple options and have it rendered to the screen in paragraph tags.  They should also be able to remove a selected option. </p>
  
  <p>This is my code to render the selected options onto the screen, so that each option appears with an 'X' next to it, when it's clicked the selected item is removed from the screen:</p>
  
  <pre><code>//Render selected item to the screen
  
  $('#dataCombo').change(function(){
  $('#dataOutput').html('');
  var values = $('#dataCombo').val();
  for(var i = 0; i &lt; values.length; i += 1) {
  $('#dataOutput').append("&lt;p class='removeable'&gt;" + values[i] + " x &lt;/p&gt;")
  }});
  
  //When the 'X' is clicked, remove that item
  
  $("#dataOutput").on('click','.removeable',function(){
  $(this).remove(); //this removes the item from the screen
  //Next i need to unselect it from dataCombo selectpicker
  var foo = $(this);
  $('#dataCombo').find('[value=foo]').remove();
  console.log(foo);
  $('dataCombo').selectpicker('refresh');
  });   
  </code></pre>
  
  <p>So the problem is the second half of the 'remove' code, while the item does get removed from the output display, it is still selected in the select picker, so when another item is selected - the 'removed' item is re-rendered.  Any ideas how i can do this?</p>
  
  <p>The HTML is pretty simple: </p>
  
  <pre><code>&lt;h6&gt;ComboBox&lt;/h6&gt;
  &lt;select id="dataCombo"  class="selectpicker" multiple&gt;
  &lt;/select&gt;
  </code></pre>