I want to add something to an element when its loaded / available.
<div class="main">
<div class="dynamic">
</div>
<div class="dynamic">
</div>
</div>
The first dynamic element is already available when the page is initially loaded. But the second one is loaded later by some javascript i cannot alter.
I tried it like this but that does not work:
$('.main').on('load/change', 'div.dynamic', function() {
$(this).html("add something");
}):
Neither the first dynamic content is loaded nor the second one.
It is probably a simple task but i cannot find the answer.
I would appreciate some help.