There's no reason why this shouldn't work... remember you cannot wire
an event to something that isn't on the DOM unless you:

(1) use the ".live()" functionality of jQuery (http://docs.jquery.com/
Events/live#typefn)

or

(2) do it after it is in the DOM, which my code shows below

$.post(
        'more_item.php',
        { NumItem: NumeroItem, Str : $("#form-itens").serialize() },
        function(data){
                NumeroItem = new Number(NumeroItem + 1);
                 $('#NumItem').val(NumeroItem);
                 var htmlStr = $('#resut_itens').html();
                 $('#resut_itens').html(data);
                 //Wire up anchor to do something
                 $("#BtMoreDefeito").click(function() {
                       // Do something
                 });
        }
);

Reply via email to