Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap optgroup selection

I am using bootstrap select plugin with bootstrap 3.0.2, which fulfils most of my requirements.
The only additional functionality I want is to be able to select an optgroup by clicking it.

For example I would like to select Picnic (picture below) just like any other option, enter image description here

Bootsrap select page

like image 770
Antonis Avatar asked May 10 '14 21:05

Antonis


1 Answers

This has little to do with Bootstrap. optgroups in HTML are not designed to selected. My suggestion would be to drop them all together and just make them normal options with a class and style them differently. However keep in mind, that many browsers are limited to how you can style options, so make sure you test this in multiple browsers.

like image 156
RoToRa Avatar answered Oct 10 '22 19:10

RoToRa