Made sure that animate callbacks get executed even when no properties are passed in. Fixes #5459.
This commit is contained in:
parent
b0fe380cf8
commit
3106039aa8
2 changed files with 17 additions and 1 deletions
|
@ -164,6 +164,10 @@ jQuery.fn.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ( jQuery.isEmptyObject( prop ) ) {
|
||||||
|
return optall.complete.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
// For JS strict compliance
|
// For JS strict compliance
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
|
@ -67,6 +67,18 @@ test("animate option (queue === false)", function () {
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
test("animate with no properties", function() {
|
||||||
|
expect(1);
|
||||||
|
|
||||||
|
var divs = jQuery("div"), count = 0;
|
||||||
|
|
||||||
|
divs.animate({}, function(){
|
||||||
|
count++;
|
||||||
|
});
|
||||||
|
|
||||||
|
equals( divs.length, count, "Make sure that callback is called for each element in the set." );
|
||||||
|
});
|
||||||
|
|
||||||
test("animate duration 0", function() {
|
test("animate duration 0", function() {
|
||||||
expect(7);
|
expect(7);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue