Using Twitter Boostrap, I'm trying to create a form dropdown with dividers within the dropdown, corresponding to each section. Is that possible?
JSFiddle included
I'd like to create something like:
<!--GROUP-->
<option>1</option>
<option>2</option>
<option>3</option>
<!--GROUP-->
<option>4</option>
<option>5</option>
<option>6</option>
To achieve this, you could use optgroup
<div class="container">
<select>
<optgroup label="Group 1">
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
</optgroup>
<optgroup label="Group 2">
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
</optgroup>
</select>
</diV>
Updated fiddle: http://jsfiddle.net/codovations/M8pSH/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With