From 5c54a4b8ee5cfea3aff55a1122b187b731319e61 Mon Sep 17 00:00:00 2001 From: Brandon Aaron Date: Mon, 30 Apr 2007 01:43:52 +0000 Subject: [PATCH] Append colgroup and col elements (#1044) --- src/jquery/coreTest.js | 7 ++++++- src/jquery/jquery.js | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 479bed0..d829d30 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -356,7 +356,7 @@ test("wrap(String|Element)", function() { }); test("append(String|Element|Array<Element>|jQuery)", function() { - expect(14); + expect(16); var defaultText = 'Try them out:' var result = $('#first').append('buga'); ok( result.text() == defaultText + 'buga', 'Check if text appending works' ); @@ -412,6 +412,11 @@ test("append(String|Element|Array<Element>|jQuery)", function() { $('#select1').append(''); ok( $('#select1 option:last').text() == "Test", "Appending <OPTION> (all caps)" ); + $('#table').append(''); + ok( $('#table colgroup').length, "Append colgroup" ); + + $('#table colgroup').append(''); + ok( $('#table colgroup col').length, "Append col" ); }); test("appendTo(String|Element|Array<Element>|jQuery)", function() { diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index d04aa61..c22c12c 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1465,7 +1465,7 @@ jQuery.extend({ !s.indexOf("", ""] || - (!s.indexOf("", ""] || !s.indexOf("", ""] || + !s.indexOf("", ""] || + [0,"",""]; // Go to html and back, then peel off extra wrappers -- 1.7.10.4