SyntaxFix
Write A Post
Hire A Developer
Questions
On the back of James Lee Baker's reply, I prefer this solution as it removes the reliance on browser support for :first :selected ...
$('#target').children().prop('selected', false); $($('#target').children()[0]).prop('selected', 'selected');