I have a template that generates images and I am binding it to div.
<script id="postTemplate" type="text/html">
<div class="post_1">
<div class="postImage"><img src="${ImageUrl}" alt="Image"></div>
</div>
</script>
Then i bind the data
<script>
$("#postTemplate").tmpl(clientData).appendTo("#imagesArea");
</script>
now, what i want is add an event handlers to that i just created. something like
("template img").error(function() {});
Adding handlers to things like click seems to work, but error fires off before I can add the handler it seems.
Not sure what your selector “template img” is referencing since I dont see any template elements.
http://api.jquery.com/live/