(function($) { $.widget('oc.addnew', { options: { width: 'auto', height: 'auto', closeOnEscape: true, autoOpen: false, autoClose: true, addText: 'Add' }, _create: function() { //console.log('ocaddnew._create', this); var self = this; this.originalCss = { display: this.element[0].style.display, width: this.element[0].style.width, height: this.element[0].style.height, }; this.originalTitle = this.element.attr('title') || this.element.attr('original-title'); //console.log('ocaddnew, originalTitle', this.originalTitle); this.options.title = this.options.title || this.originalTitle; //console.log('ocaddnew, title', this.options.title); this.element.hide(); this.$ul = $('