Im looking for a select box that i can use that has expandible optgroups
The options in the groups should not display until the mouse is move over the optgroup label
<select>
<optgroup label="group 1">
<option>1</option> <!-- Options within this group hidden until mouseover its group label -->
<option>2</option>
<option>3</option>
<option>4</option>
</optgroup>
<optgroup label="group 2">
<option>1</option> <!-- Options within this group hidden until mouseover its group label -->
<option>2</option>
<option>3</option>
<option>4</option>
</optgroup>
<optgroup label="group 3">
<option>1</option> <!-- Options within this group hidden until mouseover its group label -->
<option>2</option>
<option>3</option>
<option>4</option>
</optgroup>
</select>
I want to be able to do this becuase am going to have some very large options and it will help break them down.
If i am unable to do this through an HTML select box + JS i would like to build a customised dropdown that will support this using DIV tags. If anyone knows where i can find any information about this or a tutorial that would be great.
Thanks
NVM i found a solution that works,
I had to use HTML, CSS and JS to achieve what i wanted.
I copied this tutorial
http://www.onextrapixel.com/2012/06/20/create-a-custom-select-box-with-jquery/
and added the extra bits i needed to generate the groups and functionality.
The code that works for me is below….
This is the HTML to generate the layout
This is the Jquery JS code that creates the dropdown
And finally the CSS