Fixed some bugs relating to the setter arg change in val and html. Also optimized the code in val a bit.

This commit is contained in:
jeresig 2010-01-07 09:53:16 -05:00
parent 2526e29353
commit 4681216c4b
2 changed files with 14 additions and 19 deletions

View file

@ -173,7 +173,7 @@ jQuery.fn.extend({
html: function( value ) {
if ( value === undefined ) {
return this[0] ?
return this[0] && this[0].nodeType === 1 ?
this[0].innerHTML.replace(rinlinejQuery, "") :
null;