mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Effects core: Properly handle defaults for effects that are called with a single hash.
This commit is contained in:
parent
ea4345db06
commit
0624c74929
7
ui/jquery.effects.core.js
vendored
7
ui/jquery.effects.core.js
vendored
@ -497,9 +497,10 @@ $.extend( $.effects, {
|
||||
// return an effect options object for the given parameters:
|
||||
function _normalizeArguments( effect, options, speed, callback ) {
|
||||
|
||||
// short path for passing an effect options object:
|
||||
// allow passing all optinos as the first parameter
|
||||
if ( $.isPlainObject( effect ) ) {
|
||||
return effect;
|
||||
options = effect;
|
||||
effect = effect.effect;
|
||||
}
|
||||
|
||||
// convert to an object
|
||||
@ -518,7 +519,7 @@ function _normalizeArguments( effect, options, speed, callback ) {
|
||||
}
|
||||
|
||||
// catch (effect, speed, ?)
|
||||
if ( $.type( options ) === "number" || $.fx.speeds[ options ]) {
|
||||
if ( typeof options === "number" || $.fx.speeds[ options ] ) {
|
||||
callback = speed;
|
||||
speed = options;
|
||||
options = {};
|
||||
|
Loading…
Reference in New Issue
Block a user