Dynamically generated content

$('#section1 span').on('click', function (e) {...})

🔴

$('#section2').on('click', 'span', function (e) {...})

🟢