Skip to content
Permalink
Browse files
Added a fix for bug #1489, appending <caption> was broken.
  • Loading branch information
jeresig committed Aug 16, 2007
1 parent d38ee78 commit 760a244dbdca7b5a93d147c62ac37ff6eeb9573b
Showing with 6 additions and 2 deletions.
  1. +5 −1 src/jquery/coreTest.js
  2. +1 −1 src/jquery/jquery.js
@@ -355,7 +355,7 @@ test("wrap(String|Element)", function() {
});

test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
expect(17);
expect(18);
var defaultText = 'Try them out:'
var result = $('#first').append('<b>buga</b>');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
@@ -417,6 +417,10 @@ test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
$('#table colgroup').append('<col/>');
ok( $('#table colgroup col').length, "Append col" );

reset();
$('#table').append('<caption></caption>');
ok( $('#table caption').length, "Append caption" );

reset();
$('form:last')
.append('<select id="appendSelect1"></select>')
@@ -1566,7 +1566,7 @@ jQuery.extend({
!s.indexOf("<leg") &&
[1, "<fieldset>", "</fieldset>"] ||

(!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot") || !s.indexOf("<colg")) &&
s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
[1, "<table>", "</table>"] ||

!s.indexOf("<tr") &&

0 comments on commit 760a244

Please sign in to comment.