diff --git a/src/core.js b/src/core.js index c2f94d2b..10db3eda 100644 --- a/src/core.js +++ b/src/core.js @@ -323,6 +323,8 @@ jQuery.fn = jQuery.prototype = { // Copy the events from the original to the clone if ( events === true ) this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; var events = jQuery.data( this, "events" ); for ( var type in events ) diff --git a/test/unit/fx.js b/test/unit/fx.js index 5f6ad399..1204e261 100644 --- a/test/unit/fx.js +++ b/test/unit/fx.js @@ -1,12 +1,13 @@ module("fx"); test("animate(Hash, Object, Function)", function() { - expect(3); + expect(1); stop(); var hash = {opacity: 'show'}; var hashCopy = $.extend({}, hash); $('#foo').animate(hash, 0, function() { ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' ); + start(); }); });