Fixed a bug in jQuery.speed(), when there's no properties provided.

This commit is contained in:
John Resig 2007-01-10 00:46:10 +00:00
parent 2ad5faf3a1
commit a3806202ff

View File

@ -356,9 +356,9 @@ jQuery.fn.extend({
jQuery.extend({ jQuery.extend({
speed: function(speed, easing, fn) { speed: function(speed, easing, fn) {
var opt = speed.constructor == Object ? speed : { var opt = speed && speed.constructor == Object ? speed : {
complete: fn || !fn && easing || complete: fn || !fn && easing ||
speed.constructor == Function && speed, speed && speed.constructor == Function && speed,
duration: speed, duration: speed,
easing: fn && easing || easing && easing.constructor != Function && easing easing: fn && easing || easing && easing.constructor != Function && easing
}; };