I am refactoring a SPA using MVC with classes and etc ...
I made a method that is called when I click on a <i>
element and would like to get that element to later delete a relative of it (a <tr>
two levels above).
I'm calling this event in HTML with attr onclick="CalculaController.removeLinha()"
But if I ask to get the this
it returns me to the controller class and not the element clicked, I did some tests with type .on('click', function(){return this});
event but it did not stay 100% with some errors ...