Closed larryzhao closed 11 years ago
Hi Larry,
Two reasons:
1) You already have an option selected in your example, "California". The placeholder won't show when an option is selected.
2) Per the docs:
Note that because browsers assume the first option element is selected in non-multi-value select boxes an empty first option element must be provided (
<option></option>
) for the placeholder to work.
So you need an empty option
element as the first item in the list.
Here's an updated jsfiddle that works with placeholders: http://jsfiddle.net/9Mtr3/1/
Thanks a lot, Tim!
Hi, Tim,
Sometime the placeholder confuses me, why it doesn't work like in here: http://jsfiddle.net/9Mtr3/
Best Regards. Larry