aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2009-12-22 02:03:41 -0500
committerjeresig <jeresig@gmail.com>2009-12-22 02:03:41 -0500
commite87b090cb706b495b6c48e960d6c059c7fbddbd9 (patch)
tree9cb41ccdea1165eaf62a7fd8f1252e76a5d807a0 /src/attributes.js
parent1e64d581830f735999b60939eccf9bcdcb2e9ef9 (diff)
downloadjquery-e87b090cb706b495b6c48e960d6c059c7fbddbd9.tar.gz
jquery-e87b090cb706b495b6c48e960d6c059c7fbddbd9.zip
The logic for specified option values was already handled by .val(), removed the unnecessary code.
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/attributes.js b/src/attributes.js
index 794da70ff..d3afa89ec 100644
--- a/src/attributes.js
+++ b/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 ) {