I find out that by default JQuery doens't bind the new inserted elements. Here is a snippet which shows what I'm trying to explain.
$('#chg-em').on('click', function(e) {
$('.local').empty().append('<p id="orange-juice">orange juice<p>');
e.preventDefault();
});
$("#orange-juice").on('click', function() {
alert('ola');
});
Which might be the solution? :( Thanks.