Skip to content
Permalink
Browse files

Widget: Added ability to generate an item if no item is passed on cre…

…ation.
  • Loading branch information...
scottgonzalez committed Jan 23, 2011
1 parent f165c93 commit 3a0b617bb44565aacfa90c2ee20b293654d911c9
Showing with 2 additions and 0 deletions.
  1. +2 −0 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 );

0 comments on commit 3a0b617

Please sign in to comment.
You can’t perform that action at this time.