Skip to content
Permalink
Browse files

Added a fix for $("#noexist").attr("id") breaking.

  • Loading branch information
jeresig committed Jan 20, 2007
1 parent 32f688d commit a87ecc44b6b4374ad2ebe10e033d45daab9e1369
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/jquery/jquery.js
@@ -429,7 +429,7 @@ jQuery.fn = jQuery.prototype = {
// Look for the case where we're accessing a style value
if ( key.constructor == String )
if ( value == undefined )
return jQuery[ type || "attr" ]( this[0], key );
return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
else {
obj = {};
obj[ key ] = value;

0 comments on commit a87ecc4

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