jQuery: How to do Multiple Select from Dropdown List

Often in live, we hope for choosing more choice rather than just now. No, this doesn’t apply for your marriage.

Anywhere this is how i did it in jQuery Mobile. *happy*

<div data-role="fieldcontain">
<label for="multiselect">Select Category</label>
<select name="multiselect" id="multiselect" data-native-menu="false" multiple="multiple" size="3">
<option value="1" id="1">Choice 1</option>
<option value="2" id="2">Choice 2</option>
<option value="3" id="3">Choice 3</option>

The keyword here is multiple=”multiple”. With this, you can select as many options as possible. “size” defines how many options are there.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s