Fixed an issue with how .data() was expecting output (trigger now returns exact output - or null if none is provided, which was tripping it up).

This commit is contained in:
John Resig 2008-12-19 06:49:03 +00:00
parent 46ee77bcc3
commit 62bd7e6817

View file

@ -482,7 +482,7 @@ jQuery.fn = jQuery.prototype = {
if ( data === undefined && this.length ) if ( data === undefined && this.length )
data = jQuery.data( this[0], key ); data = jQuery.data( this[0], key );
return data === undefined && parts[1] ? return data == null && parts[1] ?
this.data( parts[0] ) : this.data( parts[0] ) :
data; data;
} else } else