aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-01-24 13:33:24 -0500
committerScott González <scott.gonzalez@gmail.com>2011-01-24 13:33:24 -0500
commitcc90b440607a1af87c4abb8b2ee3325e96b0f5a1 (patch)
tree7152681fe4f4280f8ff6aa441163d7a7f1f29454 /ui
parentbc71499a505d0932668b4ae75603cd9dbfd4a2ac (diff)
downloadjquery-ui-cc90b440607a1af87c4abb8b2ee3325e96b0f5a1.tar.gz
jquery-ui-cc90b440607a1af87c4abb8b2ee3325e96b0f5a1.zip
Widget: Allow this.element to be the widget instance instead of a DOM element. Fixes #6895 - Widget: Allow non-DOM based widget.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.widget.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index f6089519b..7dfcb4447 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -133,7 +133,7 @@ $.Widget.prototype = {
disabled: false
},
_createWidget: function( options, element ) {
- element = $( element || this.defaultElement )[ 0 ];
+ element = $( element || this.defaultElement || this )[ 0 ];
$.data( element, this.widgetName, this );
this.element = $( element );
this.options = $.extend( true, {},