I have found in jquery mobile this code to select multiple items.
<div class="ui-field-contain" >
<label for="select-custom-19">Multiple:</label>
<select name="select-custom-19" id="select-custom-19" multiple="multiple" data-native-menu="false" >
<option>Choose options</option>
<option value="1"> 1st </option>
<option value="2" selected="selected">2nd </option>
<option value="3" selected="selected"> 3rd </option>
<option value="4">4th </option>
</select>
</div>
I have found a way to reduce the size of the list box like this :
<select data-mini="true" data-inline="true" name="select-custom-19" id="select-custom-19" multiple="multiple" data-native-menu="false" >
It's smaller but not the size I would like (I would like even smaller) - how to do it?
I have tried : style="width:5%;" but it doesn't work.
Also I would like to fix this list box in a specific position. For example, when I want to place a button in a position in the screen I use this, and it works fine :
<button style="position: absolute; top:470px; left:310px;" onclick="stopMusic()" type="button"></button>
but
<select style="position: absolute; top:470px; left:310px;" data-mini="true" data-inline="true" name="select-custom-19" id="select-custom-19" multiple="multiple" data-native-menu="false" >
doesn't work. Thank you for your help
Good catch. The native select will be wrapped by the framework, but the
data-wrapper-classwon't work (it seems to be an open TODO which hasn't be never fully implemented for theselectmenuby the JQM team). The keypoint here is to find the parent wrapperdivwhich has classui-selectand style that one.You can either:
selectwidget creationHere is an example which shows both options: