Save the area of the required thisinside the variable.
$.widget("ui.myWidget", {
options: {
myOptions: "test"
},
_create: function () {
var that = this;
this.self = $(this.element[0]);
this.self.find("thead th").click(function () {
that._headerClick();
});
this.self._somethingElse();
},
_headerClick: function (){
},
_somethingElse: function (){
},
source
share