declare
(function ($) {
$.widget('my.popup', $.ui.dialog, {
'create': function (event, ui) {
// this one is NOT called
console.debug('create');
},
'_create': function () {
// OK
console.debug('_create');
return this._super();
}
});
}(jQuery));
call
var div = jQuery('<div>').appendTo('body');
div.on('widgetcreate', function (event, ui) {
// this one is NOT called
console.debug('widgetcreate');
});
div.on('popupcreate', function (event, ui) {
// OK
console.debug('popupcreate');
});
div.popup();
I can understand why 'widgetcreate' does not work, but 'create' in options? jQuery.Widget has create (http://ift.tt/1FIOGLN) and I guess dialog should inherit it and fire it internally with proper new name.
What is the problem?
Aucun commentaire:
Enregistrer un commentaire