You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2019. It is now read-only.
I'm working with requirements that cause the select box to have options with the same name but different values.
Is there a reason behind keying the options object by name instead of value and therefore defaulting operations to .get by name?
Would it be possible to switch to value instead?
If not, would it be too confusing to add a fallback to lookup an option by value?
Append .get with something like:
varopt=this.options[name];if(!opt){each(this.options,function(k,option){if(option.value===name)opt=option;});}if(!opt)thrownewError('option "'+name+'" does not exist');returnopt;