I am trying to expand the user interface dialog according to the documentation (UI version 1.8.16):
(function($) { $.widget('ui.mydialog', $.extend(true, $.ui.dialog.prototype, { _create: function() { return $.Widget.prototype._create.apply(this, arguments); } })); })(jQuery); $(function() { $('div#dialog').mydialog(); });
Executing this code causes a JS error: "this.uiDialog - undefined".
And if you try to override the _init () method, there are no errors, but the call to the parent method is not affected.
I am embarrassed. Which method is finished for renewal, for example. put some custom initialization code?
source share