aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/manipulation.js2
-rw-r--r--src/support.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 1453f98c5..a10feae93 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -321,7 +321,7 @@ jQuery.fn.extend({
parent = value && value.parentNode;
// If we're in a fragment, just use that instead of building a new one
- if ( parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+ if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
results = { fragment: parent };
} else {
diff --git a/src/support.js b/src/support.js
index befc53272..c9ff58c36 100644
--- a/src/support.js
+++ b/src/support.js
@@ -56,6 +56,8 @@
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
+ parentNode: div.removeChild( div.appendChild( document.createElement("div") ) ).parentNode === null,
+
// Will be defined later
checkClone: false,
scriptEval: false,