This question has been asked before, and the answer is:
$('#container').on('click','#dynamicElement', function(){ });
The above code will be found #dynamicElement
when you click on it. But what if there is no click or any other event?
Assume the following scenario:
$.ajax(
url:'file.php',
data: {'param':'value'},
success: function(response){
}
);
source
share