Inherit widget

Inherit widget


I try to inherit a dialog widget.
This is my code :
$(document).ready(function(){
(function($){
$.widget("ui.myDialog", $.extend({}, $.ui.dialog, {
}));
})(jQuery);
//I call my widget
$("#myDiv").myDialog({title:'MY DIALOG'});
});
I should have the same result than if I used a dialog object. No ?
Thank you.