option: [ 1, "<select multiple='multiple'>", "</select>" ],
thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
// Support: IE 9
wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.col = wrapMap.thead;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
jQuery.fn.extend({
ok( jQuery.nodeName( this, results[ i ] ) );
});
});
+
+test( "Validate creation of multiple quantities of certain elements (#13818)", 44, function() {
+ var tags = [ "thead", "tbody", "tfoot", "colgroup", "col", "caption", "tr", "th", "td", "optgroup", "option" ];
+
+ jQuery.each( tags, function( index, tag ) {
+ jQuery( "<" + tag + "/><" + tag + "/>" ).each(function() {
+ ok( jQuery.nodeName( this, tag ), tag + " empty elements created correctly" );
+ });
+
+ jQuery( "<" + this + "></" + tag + "><" + tag + "></" + tag + ">" ).each(function() {
+ ok( jQuery.nodeName( this, tag ), tag + " elements with closing tag created correctly" );
+ });
+ });
+});