Here is my TypeScript code snippet.
class something {
createSomething(): JQuery {
let result = $('<div>');
$('<input>').on('change paste keyup', () => {
this.myProperty = $(this).val;
this.change();
}).appendTo(result);
return result;
}
myProperty: string;
change() {
alert('yeah');
} }
In the handle function, the issue arises when trying to access both 'this' and '$(this)' simultaneously.
What would be the best approach to solve this problem?