git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e64d58
)
The logic for specified option values was already handled by .val(), removed the...
author
jeresig
<jeresig@gmail.com>
Tue, 22 Dec 2009 07:03:41 +0000
(
02:03
-0500)
committer
jeresig
<jeresig@gmail.com>
Tue, 22 Dec 2009 07:03:41 +0000
(
02:03
-0500)
src/attributes.js
patch
|
blob
|
history
diff --git
a/src/attributes.js
b/src/attributes.js
index
794da70
..
d3afa89
100644
(file)
--- 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() {
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 ) {
});
if ( !values.length ) {