Commit e87b090c authored by jeresig's avatar jeresig

The logic for specified option values was already handled by .val(), removed the unnecessary code.

parent 1e64d581
...@@ -171,9 +171,7 @@ jQuery.fn.extend({ ...@@ -171,9 +171,7 @@ jQuery.fn.extend({
var values = jQuery.makeArray(val); var values = jQuery.makeArray(val);
jQuery( "option", this ).each(function() { jQuery( "option", this ).each(function() {
// IE 6 will return "" for the value if one isn't specified, instead of the text this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
var node = this.getAttributeNode("value");
this.selected = jQuery.inArray( node && node.specified ? node.value : this.value || this.text, values ) >= 0;
}); });
if ( !values.length ) { if ( !values.length ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment