aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.core.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-08-26 02:06:19 +0000
committerScott González <scott.gonzalez@gmail.com>2009-08-26 02:06:19 +0000
commit6c6218fa12cc25695d2203a536b2047879ad904d (patch)
treedbd5ddc3c69e6ed85662a2c96f0153cb669238bf /ui/ui.core.js
parent99d09ecfaf46b3bde207b17e7a85d5b4bfe19535 (diff)
downloadjquery-ui-6c6218fa12cc25695d2203a536b2047879ad904d.tar.gz
jquery-ui-6c6218fa12cc25695d2203a536b2047879ad904d.zip
Widget factory: Support passing multiple option hashes on init. Fixes #4784.
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r--ui/ui.core.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index e166f0f06..37f1f09e9 100644
--- a/ui/ui.core.js
+++ b/ui/ui.core.js
@@ -253,6 +253,11 @@ $.widget = function(name, prototype) {
args = Array.prototype.slice.call(arguments, 1),
returnValue = this;
+ // allow multiple hashes to be passed on init
+ options = !isMethodCall && args.length
+ ? $.extend.apply(null, arguments)
+ : options;
+
// prevent calls to internal methods
if (isMethodCall && options.substring(0, 1) == '_') {
return returnValue;