function remove(element) {
    var index = element.getAttribute('data-index');
    select[0].options[index].selected = false;
    element.parentNode.parentNode.removeChild(element.parentNode);
  }
// element to de-select. Removes tag
element to de-select. Removes tag
element to de - select . Removes tag
function remove(element) {
    var index = element.getAttribute('data-index');
    select[0].options[index].selected = false;
    element.parentNode.parentNode.removeChild(element.parentNode);
  }
function remove ( element ) { var index = element . getAttribute ( 'data-index' ) ; select [ 0 ] . options [ index ] . selected = false ; element . parentNode . parentNode . removeChild ( element . parentNode ) ; }
element to de-select.
element to de - select .