jQuery.fn.extend({
show: function(speed,callback){
- if ( speed ) {
+ if ( speed !== undefined ) {
return this.animate( genFx("show", 3), speed, callback);
} else {
for ( var i = 0, l = this.length; i < l; i++ ){
},
hide: function(speed,callback){
- if ( speed ) {
+ if ( speed !== undefined ) {
return this.animate( genFx("hide", 3), speed, callback);
} else {
for ( var i = 0, l = this.length; i < l; i++ ){
*/
test("animate duration 0", function() {
- expect(5);
+ expect(7);
stop();
// Failed until [6115]
equals( counter, 5, "One synchronic and one asynchronic" );
start();
- });
+ });
+
+ var $elem = jQuery("<div />");
+ $elem.show(0, function(){
+ ok(true, "Show's callback with no duration");
+ });
+ $elem.hide(0, function(){
+ ok(true, "Show's callback with no duration");
+ });
});
test("animate hyphenated properties", function(){