How can I target and append content to already dynamically added content?
HTML:
<body>
<div class="container">
<figure class="special_images" data-effect="zoom" data-profiles="test" data-options="some options">
<img data-src="specialImage0.jpg"/>
<img data-src="specialImage1.jpg"/>
<img data-src="specialImage2.jpg"/>
<img data-src="specialImage3.jpg"/>
<img data-src="specialImage4.jpg"/>
</figure>
<div class="normal_images">
<img src="normalImage0.jpg"/>
<img src="normalImage1.jpg"/>
</div>
</div>
</body>
Everything in the special_image figure will be changed on page load by an external script, so I don't have influence on this (otherwise all of my problems wouldn't exist).
HTML manipulated by external script:
<body>
<div class="container">
<figure class="special_images thumbs-bottom" data-effect="zoom" data-profiles="test" data-options="some options">
<div class="some classes">
<div>
<!-- multiple layers of added content -->
</div>
<div class="thumbnails thumbnails-horizontal">
<div class="thumbnails thumbnails-horizontal">
<div class="thumbnails-wrapper">
<ul style="some styles">
<li class="thumbnail-selected"><img src="specialImage0?someParameters"></li>
<li><img src="specialImage1.jpg?someParameters"></li>
<li><img src="specialImage2.jpg?someParameters"></li>
<li><img src="specialImage3.jpg?someParameters"></li>
<li><img src="specialImage4.jpg?someParameters"></li>
</ul>
</div>
</div>
</div>
</div>
</figure>
<div class="normal_images">
<img src="normalImage0.jpg"/>
<img src="normalImage1.jpg"/>
</div>
</div>
</body>
After the external script added all of those elements, I need to append the normal images into the unordered list created by the script.
jQuery can't seem to find the added elements when I try to target them, even if I delay the function and wait until the external script finished the job.
I did not find any solution to do this and I hope someone here can help me. The jQuery on() sadly doesn't work here, the contents should be moved automatically and are not fired by a click handler.
Thanks in advance for any tips or clues.