[jQuery] Changing select list option

[jQuery] Changing select list option


I'm currently trying to select a specific option in a form using
jQuery
I've tried
$('element')[0].selectedIndex = X;
Where X is an id number (and the select list has IDs as the value).
However this has given unpredictable results.
Can I do this by adding the selected attribute (would it make the form
change on screen?) or is there something I'm missing?
Thanks in advance