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 3a7b09e5c747a9bf1386d667c7abed9630097072
Showing with 1 addition and 3 deletions.
  1. +1 −3 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 ||

0 comments on commit 3a7b09e

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