aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-04-02 22:35:42 -0400
committerScott González <scott.gonzalez@gmail.com>2012-04-02 22:35:42 -0400
commit0624c74929b60104cfcdd2463619e903fcfd0792 (patch)
treeb5e9591f2b7c4e1855ba860e7f72bd813b16b6ab /ui
parentea4345db06222225f47d2ef9af6121d34e6e497e (diff)
downloadjquery-ui-0624c74929b60104cfcdd2463619e903fcfd0792.tar.gz
jquery-ui-0624c74929b60104cfcdd2463619e903fcfd0792.zip
Effects core: Properly handle defaults for effects that are called with a single hash.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.effects.core.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index 1d56ae62f..626ab1a89 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -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 = {};