How do you preselect an option in a multiple select html tag using jquery\'s val()?
What I mean by this is that say you have a multiselect component and you want some o
You can do it like this:
HTML:
Volvo Saab Mercedes Audi
jQuery:
$("select").val(["volvo", "mercedes"]).prop("selected", true);
Here's a fiddle with the example: http://jsfiddle.net/HCm3e/