I have the following jQuery code:
$('.class-name').each(function() {
$(this).parent().prepend(this);
});
So it targets .class-name and works fine on page load.
I want it to also target any elements that is added dynamically (after page load) with class .class-name.
How can I do this?