aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorBrandon Aaron <brandon.aaron@gmail.com>2009-05-16 19:32:16 +0000
committerBrandon Aaron <brandon.aaron@gmail.com>2009-05-16 19:32:16 +0000
commit4a99fcf6e4b152706b951df584614da32b08f6e4 (patch)
treebacd8669d36c133db807b3c7f44f80e8ad683741 /src/manipulation.js
parenta4a58a38360039deda2905a34ebc6140d3c259b7 (diff)
downloadjquery-4a99fcf6e4b152706b951df584614da32b08f6e4.tar.gz
jquery-4a99fcf6e4b152706b951df584614da32b08f6e4.zip
fix remove and empty to work properly in IE when an element with the id of length exists. fixes ajax event hanlders in test suite from firing multiple times because they did not get cleaned up.
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index c537c7095..13983fb01 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -186,8 +186,7 @@ jQuery.each({
remove: function( selector ) {
if ( !selector || jQuery.multiFilter( selector, [ this ] ).length ) {
if ( this.nodeType === 1 ) {
- cleanData( this.getElementsByTagName("*") );
- cleanData( [this] );
+ cleanData( jQuery("*", this).add(this) );
}
if ( this.parentNode ) {
@@ -199,7 +198,7 @@ jQuery.each({
empty: function() {
// Remove element nodes and prevent memory leaks
if ( this.nodeType === 1 ) {
- cleanData( this.getElementsByTagName("*") );
+ cleanData( jQuery("*", this) );
}
// Remove any remaining nodes