Given:
<select multiple="multiple" id="foo">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
Do it:
$('#foo option').attr('selected', 'selected');
This will select all of them. This is the best I can give you, without a more specific question.
source
share