I have a jQuery code that generates a div it works quietly, in it I have the following excerpt
div += "<p>Coloque o seu <a class='text-orange' id='link_new_ad'>veículo a disposição</a>!</p>";
Then I add this div and it appears on the right screen, but my problem is that I wanted to call the event of another button by clicking this link
$("#link_new_ad").click(function (){
alert('teste');
$("#bundle_ad_submit").trigger('click');
});
But when I click on the link nothing happens, its put the link in the html rather than put by the append (div) it calls the event.
Does anyone know what's going on, and is it better to arrange?