I'm an jQuery noob and I'm wondering how fix this issue:
- I have an external .js script, let's take reflection.js as example.
- Reflection.js creates canvas reflection for every class="reflect" image.
- I'm appending a few images trough different JS script that starts when ('document').ready.
- Of course reflection.js doesn't work for images created by the script above.
How to avoid that?
I guess I'll need callback (?). Unfortunately I'm not getting idea of callbacks idea even after reading documentation.
[edit]
<script src="js/reflection.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery().ready(function() {
jQuery('#thumbs li').each(function(){
jQuery('.'+id+' a').append('<img src="' + imgURL + '" class="reflect" /></a>');
});
});
</script>