animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed(speed, easing, callback);
+ if ( jQuery.isEmptyObject( prop ) ) {
+ return this.each( optall.complete );
+ }
+
return this[ optall.queue === false ? "each" : "queue" ](function() {
var opt = jQuery.extend({}, optall), p,
hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
}
});
- if ( jQuery.isEmptyObject( prop ) ) {
- return optall.complete.call(this);
- }
-
// For JS strict compliance
return true;
});
*/
test("animate with no properties", function() {
- expect(1);
+ expect(2);
var divs = jQuery("div"), count = 0;
});
equals( divs.length, count, "Make sure that callback is called for each element in the set." );
+
+ stop();
+
+ var foo = jQuery("#foo");
+
+ foo.animate({});
+ foo.animate({top: 10}, 100, function(){
+ ok( true, "Animation was properly dequeued." );
+ start();
+ });
});
test("animate duration 0", function() {