From cc90b440607a1af87c4abb8b2ee3325e96b0f5a1 Mon Sep 17 00:00:00 2001 From: Scott González Date: Mon, 24 Jan 2011 13:33:24 -0500 Subject: Widget: Allow this.element to be the widget instance instead of a DOM element. Fixes #6895 - Widget: Allow non-DOM based widget. --- ui/jquery.ui.widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') 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, {}, -- cgit v1.2.3