Use the optgroup
wrapper on your options.
Example:
<select>
<optgroup label="Your Title">
<option>1</option>
</optgroup>
</select>
Question
I'm developping a mobile application with phonegap. In this app, i use "select" elements. When i click on the select to change the option, a pop-up appears (as expected) with the options.
My question is : Is there a way to add a title to this pop-up ? (without plugin)
Thanks
Solution
Use the optgroup
wrapper on your options.
Example:
<select>
<optgroup label="Your Title">
<option>1</option>
</optgroup>
</select>