I'm developing a delete button on the product form that I have, it works like this
- Category 1 (Radio Button)
- Category 2 (Radio Button)
After selecting a category, it sends a jQuery
command to the $ post function and creates html
elements in a part of the site with several radio button
like this:
- Filter 1 (DELETE)
- Filter 2 (DELETE)
- Filter 3 (DELETE)
When you click (DELETE) it has to execute a function with the following code
$("a#filtro").click(function(){
alert($(this).attr('valor'));
});
That is, the client will select a category and selecting it will generate HTML with Radio Button for filters, and when selecting a filter it will alert()
displaying the filter value. The problem is that the alert
code is not running because I think it's because it's added by $("#meusfiltros").html('codigo-html-aqui');
. Now if I click on a link with the same div
#filter it will display without problems as it was already on the page at the time you uploaded.