image-picker
image-picker copied to clipboard
Change is_selected() to use selectedIndex property for selection instead of $.val()
Disabled select might not show the selected value due to $.val() returning null if the select is disabled, see: http://bugs.jquery.com/ticket/13097.
Looks good to me. A few questions:
- Is this reliable across browsers? or should we use this as a fallback only when the select is disabled.
- Does this play nice with multi select elements?
Yes, might be better as a fallback solution... selectedIndex will return the first selected option for multiple selects so in that case it's best to walk the options list and gather the selected ones to an array.