please refer to the following code,
var XClass = function () {
this.dataMember = "hello world";
$("div").on("click", "button", function() {
console.log(this.dataMember); //error
});
}
How do I access this.dataMember in on function? I googled and new on js.