Skip to content
Permalink
Browse files
Fixed a bug with .append() and <td>/<tr>.
  • Loading branch information
jeresig committed Jan 10, 2007
1 parent 6de5275 commit 84ecf3937b156e7892131481ed6b1df230bbbbc7
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/jquery/jquery.js
@@ -1355,16 +1355,17 @@ jQuery.extend({

var wrap =
// option or optgroup
!s.indexOf("<opt") && [1, "<select>", "</select>"] ||
!s.indexOf("<opt") &&
[1, "<select>", "</select>"] ||

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

!s.indexOf("<tr") &&
[2, "<table><tbody>", "</tbody></table>"] ||

// <thead> matched above
!s.indexOf("<td") || !s.indexOf("<th") &&
(!s.indexOf("<td") || !s.indexOf("<th")) &&
[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||

[0,"",""];
@@ -1400,6 +1401,7 @@ jQuery.extend({
r.push( arg );
else
r = jQuery.merge( r, arg );

}

return r;

0 comments on commit 84ecf39

Please sign in to comment.