I want to call from Jquery scope (which is in the same class) to same class function/method. How I should do?
I tried:
displayTemplate.findWithAttr(action);
or
this.findWithAttr(action);
Response
"this.findWithAttr is not a function"
Here is my code.
class displayTemplate{
findWithAttr(action) {
//to do something with action
}
router(action){
if(action == "something"){
$( "#confirm_dialog_msg" ).text("text?");
$( "#dialog-confirm" ).dialog({
buttons: {
"yes": function() {
$( this ).dialog( "close" );
//how in this area call to "findWithAttr" function above?
this.findWithAttr(action);
},
"No": function() {
//..
}
}
});
}
//...
}
}