Switch from .attr('selected') to .prop('selected')