jquery core: closes #3053. clean() wasn't parsing 0's. So html( 0 ) was failing failing.
This commit is contained in:
parent
2f2602ed15
commit
5e50079b14
1 changed files with 4 additions and 4 deletions
|
@ -943,12 +943,12 @@ jQuery.extend({
|
||||||
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
|
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
|
||||||
|
|
||||||
jQuery.each(elems, function(i, elem){
|
jQuery.each(elems, function(i, elem){
|
||||||
|
if ( typeof elem == 'number' )
|
||||||
|
elem += '';
|
||||||
|
|
||||||
if ( !elem )
|
if ( !elem )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( elem.constructor == Number )
|
|
||||||
elem += '';
|
|
||||||
|
|
||||||
// Convert html string into DOM nodes
|
// Convert html string into DOM nodes
|
||||||
if ( typeof elem == "string" ) {
|
if ( typeof elem == "string" ) {
|
||||||
// Fix "XHTML"-style tags in all browsers
|
// Fix "XHTML"-style tags in all browsers
|
||||||
|
@ -1368,4 +1368,4 @@ jQuery.each([ "Height", "Width" ], function(i, name){
|
||||||
// Helper function used by the dimensions and offset modules
|
// Helper function used by the dimensions and offset modules
|
||||||
function num(elem, prop) {
|
function num(elem, prop) {
|
||||||
return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
|
return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue