aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.widget.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r--ui/jquery.ui.widget.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 59c362838..1b00006a0 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -116,10 +116,12 @@ $.Widget = function( options, element ) {
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
+ defaultElement: "<div>",
options: {
disabled: false
},
_createWidget: function( options, element ) {
+ element = $( element || this.defaultElement )[ 0 ];
// $.widget.bridge stores the plugin instance, but we do it anyway
// so that it's stored even before the _create function runs
$.data( element, this.widgetName, this );