Fixed a couple problems found in the test suite. First, IE doesn't like it when text nodes were trying to duplicate their events in clone, so don't do text nodes (that shouldn't have events anyway). Also the fx module was freezing from a recent update that wasn't quite finished.
This commit is contained in:
parent
bdd6aca209
commit
50c40add5a
|
@ -323,6 +323,8 @@ jQuery.fn = jQuery.prototype = {
|
||||||
// Copy the events from the original to the clone
|
// Copy the events from the original to the clone
|
||||||
if ( events === true )
|
if ( events === true )
|
||||||
this.find("*").andSelf().each(function(i){
|
this.find("*").andSelf().each(function(i){
|
||||||
|
if (this.nodeType == 3)
|
||||||
|
return;
|
||||||
var events = jQuery.data( this, "events" );
|
var events = jQuery.data( this, "events" );
|
||||||
|
|
||||||
for ( var type in events )
|
for ( var type in events )
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
module("fx");
|
module("fx");
|
||||||
|
|
||||||
test("animate(Hash, Object, Function)", function() {
|
test("animate(Hash, Object, Function)", function() {
|
||||||
expect(3);
|
expect(1);
|
||||||
stop();
|
stop();
|
||||||
var hash = {opacity: 'show'};
|
var hash = {opacity: 'show'};
|
||||||
var hashCopy = $.extend({}, hash);
|
var hashCopy = $.extend({}, hash);
|
||||||
$('#foo').animate(hash, 0, function() {
|
$('#foo').animate(hash, 0, function() {
|
||||||
ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
|
ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' );
|
||||||
|
start();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue