I have a routine in JS which is as follows:
$('body').on('click', 'a.remover', function(e) {
e.preventDefault();
$(this).closest('.info').html("<p>Escolha ao lado</p>").parent().find('input[type=hidden]').val();
});
I would like that when I click on the .remover I would look for the nearest .info div, replace its content with the above, and also clear the value of two input hiddens contained in the .info parent ...
But it did not. It did not return any syntax errors, but did not execute the function.
HTML Structure (Debugger Print, since elements are added dynamically):
How can I proceed?