I have some code like this:
$('.play').on( 'click', function(){
console.log('click');
});
The .play element is dynamically created with $('.game').html('<span class="paly">Play</span>') method. However, I have nothing in my console log when I'm clicking on this span. What am I doing wrong?
Thanks.
PS: I am using jQuery 1.7.1
on()likebind()not likeon()