Revert the changes from 65ebf57c1e
, they were ineffectual against IE's insanity: http://ejohn.org/files/bugs/fragment/ Used a different tactic instead (just don't return a fragment from .parent()). Fixes #5638.
This commit is contained in:
parent
ba86cc0294
commit
ed5731dcc4
|
@ -53,7 +53,7 @@ var jQuery = function( selector, context ) {
|
||||||
|
|
||||||
jQuery.fn = jQuery.prototype = {
|
jQuery.fn = jQuery.prototype = {
|
||||||
init: function( selector, context ) {
|
init: function( selector, context ) {
|
||||||
var match, elem, ret, doc, parent;
|
var match, elem, ret, doc;
|
||||||
|
|
||||||
// Handle $(""), $(null), or $(undefined)
|
// Handle $(""), $(null), or $(undefined)
|
||||||
if ( !selector ) {
|
if ( !selector ) {
|
||||||
|
@ -88,12 +88,7 @@ jQuery.fn = jQuery.prototype = {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ret = buildFragment( [ match[1] ], [ doc ] );
|
ret = buildFragment( [ match[1] ], [ doc ] );
|
||||||
parent = ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment;
|
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
|
||||||
selector = [];
|
|
||||||
|
|
||||||
while ( parent.firstChild ) {
|
|
||||||
selector.push( parent.removeChild( parent.firstChild ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HANDLE: $("#id")
|
// HANDLE: $("#id")
|
||||||
|
|
|
@ -161,7 +161,7 @@ jQuery.fn.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery.each({
|
jQuery.each({
|
||||||
parent: function(elem){return elem.parentNode;},
|
parent: function(elem){var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null;},
|
||||||
parents: function(elem){return jQuery.dir(elem,"parentNode");},
|
parents: function(elem){return jQuery.dir(elem,"parentNode");},
|
||||||
parentsUntil: function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},
|
parentsUntil: function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},
|
||||||
next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
|
next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
|
||||||
|
|
Loading…
Reference in a new issue