From: John Resig Date: Thu, 16 Aug 2007 03:35:29 +0000 (+0000) Subject: Added a fix for bug #1489, appending was broken. X-Git-Tag: 1.1.4~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=760a244dbdca7b5a93d147c62ac37ff6eeb9573b;p=jquery.git Added a fix for bug #1489, appending was broken. --- diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 905d92a4f..b65877a30 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -355,7 +355,7 @@ test("wrap(String|Element)", function() { }); test("append(String|Element|Array<Element>|jQuery)", function() { - expect(17); + expect(18); var defaultText = 'Try them out:' var result = $('#first').append('buga'); ok( result.text() == defaultText + 'buga', 'Check if text appending works' ); @@ -417,6 +417,10 @@ test("append(String|Element|Array<Element>|jQuery)", function() { $('#table colgroup').append(''); ok( $('#table colgroup col').length, "Append col" ); + reset(); + $('#table').append(''); + ok( $('#table caption').length, "Append caption" ); + reset(); $('form:last') .append('') diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 07588baac..94f099be8 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1566,7 +1566,7 @@ jQuery.extend({ !s.indexOf("", ""] || - (!s.indexOf("", ""] || !s.indexOf("