Example of this issue on JSFiddle
Ran in Chrome, latest, Ubuntu.
When using jQuery to hide option
elements inside a select
element it uses display: none;
and display: inline
to alter visibility. I have encountered a situation where when a majority of option
elements have been hidden, those that should be visible do not appear either. Removing one option from the list at this point will show just one other option but with arrow buttons, as if the issue is with the height of the select
drop down.
I have been unable to find whether there is a limit placed on the number of hidden options inside a select or similar restrictions; has anyone encountered this before?
Examples
- Hide/show class example showing how it works when one block is commented out
- Two block CSS example to show how one set of options works, another doesn't.