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:
da76a72
)
jquery core: saving some bytes in $.fn.val by using $.makeArray.
author
Ariel Flesler
<aflesler@gmail.com>
Fri, 16 May 2008 18:32:03 +0000
(18:32 +0000)
committer
Ariel Flesler
<aflesler@gmail.com>
Fri, 16 May 2008 18:32:03 +0000
(18:32 +0000)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
27cdbfe
..
56a2b1f
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-410,9
+410,7
@@
jQuery.fn = jQuery.prototype = {
jQuery.inArray(this.name, value) >= 0);
else if ( jQuery.nodeName( this, "select" ) ) {
- var values = value.constructor == Array ?
- value :
- [ value ];
+ var values = jQuery.makeArray(value);
jQuery( "option", this ).each(function(){
this.selected = (jQuery.inArray( this.value, values ) >= 0 ||