Skip to content
Permalink
Browse files

The logic for specified option values was already handled by .val(), …

…removed the unnecessary code.
  • Loading branch information
jeresig committed Dec 22, 2009
1 parent 1e64d58 commit e87b090cb706b495b6c48e960d6c059c7fbddbd9
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/attributes.js
@@ -171,9 +171,7 @@ jQuery.fn.extend({
var values = jQuery.makeArray(val);

jQuery( "option", this ).each(function() {
// IE 6 will return "" for the value if one isn't specified, instead of the text
var node = this.getAttributeNode("value");
this.selected = jQuery.inArray( node && node.specified ? node.value : this.value || this.text, values ) >= 0;
this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
});

if ( !values.length ) {

0 comments on commit e87b090

Please sign in to comment.
You can’t perform that action at this time.