I want to override jQueryUI dialog widget inner method. In this example it is only adding "console.log('button');" to the original function
This is my code:
$.extend($.ui.dialog.prototype,
{
_createButtons: function() {
console.log('button');
var e = this, i = this.options.buttons;
return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), t.isEmptyObject(i) || t.isArray(i) && !i.length ? (this.uiDialog.removeClass("ui-dialog-buttons"), undefined) : (t.each(i, function(i, s) {
var n, a;
s = t.isFunction(s) ? {click: s,text: i} : s, s = t.extend({type: "button"}, s), n = s.click, s.click = function() {
n.apply(e.element[0], arguments)
}, a = {icons: s.icons,text: s.showText}, delete s.icons, delete s.showText, t("<button></button>", s).button(a).appendTo(e.uiButtonSet)
}), this.uiDialog.addClass("ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog), undefined)
}
}
);
I get this error: "Uncaught ReferenceError: t is not defined"
What is wrong here? Or what is the proper way to do the task?