$('#myselect option:eq(1)').attr('selected', 'selected');
This will select the first option
To deslect it do not use null ( as in attr('selected', null)) but rather use removeAttr as in
$('#myselect option:eq(1)').removeAttr('selected');
Print | posted @ Wednesday, November 03, 2010 9:42 AM
No comments posted yet.