Skip to content
Permalink
Browse files
jquery core: saving some bytes in $.fn.val by using $.makeArray.
  • Loading branch information
flesler committed May 16, 2008
1 parent da76a72 commit 3a7b09e
Showing 1 changed file with 1 addition and 3 deletions.
@@ -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 ||

0 comments on commit 3a7b09e

Please sign in to comment.