Created
February 24, 2015 22:52
-
-
Save devdays/9a4a81a177607d93e04d to your computer and use it in GitHub Desktop.
Handling clicks in jQuery UI Widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_create: function () { | |
... | |
this._on(this.elTitle, { | |
click: "_titleClick" // Note: function name must be passed as a string! | |
}); | |
}, | |
_titleClick: function (event) { | |
console.log(this); // 'this' is now the widget instance. | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment