I am listening for click events on the class notification-link
:
$(document).ready(function(){
$('.notifications-link').click(
function(){
$('.notifications-popup').addClass('show')
}
)
});
Works fine. The problem is, if I append a new Element with the class notification-link
to the DOM, jQuery doesn't listen for it = if you clicked on the appended Element, nothing happens.
How can I fix that?