Skip to content

Commit

Permalink
Widget: Added ability to generate an item if no item is passed on cre…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
scottgonzalez committed Jan 23, 2011
1 parent f165c93 commit 3a0b617
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/jquery.ui.widget.js
Expand Up @@ -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 );
Expand Down

0 comments on commit 3a0b617

Please sign in to comment.