I've this element
<img class="imgclass" src="img.jpg">
And this code
$(document).ready(function() {
$('.imgclass').click(function(){
alert('Works!!!');
}); //click
// I need to load something in other moment
$(something).load(function(){
$('<img src="iamge.jpg">').addClass('imgclass').insertAfter('img');
});
});
If I click first IMG, it works, but second, nothing. How colud i refresh classes event without copying all the function?
The example: https://jsfiddle.net/q860upLv/2/
Thanks,