mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Revert "Manipulation: don't auto-insert tbody"
This reverts commit e984d1c79c
.
Fixes gh-2861
This commit is contained in:
parent
cff3957457
commit
412c5dfb0d
@ -38,14 +38,14 @@ var
|
|||||||
rscriptTypeMasked = /^true\/(.*)/,
|
rscriptTypeMasked = /^true\/(.*)/,
|
||||||
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
||||||
|
|
||||||
|
// Manipulating tables requires a tbody
|
||||||
function manipulationTarget( elem, content ) {
|
function manipulationTarget( elem, content ) {
|
||||||
if ( jQuery.nodeName( elem, "table" ) &&
|
return jQuery.nodeName( elem, "table" ) &&
|
||||||
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
|
||||||
|
|
||||||
return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
|
elem.getElementsByTagName( "tbody" )[ 0 ] ||
|
||||||
}
|
elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
|
||||||
|
elem;
|
||||||
return elem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace/restore the type attribute of script elements for safe DOM manipulation
|
// Replace/restore the type attribute of script elements for safe DOM manipulation
|
||||||
|
Loading…
Reference in New Issue
Block a user