I am creating new <span>
inside a <div id="boxclass"></div>
with jQuery
like this:
$("#boxclass").append("<span id='test'></span>");
But I cant access the newly created spans on click.
$( "#test" ).click(function() {
alert("Clicked on appended span");
});
How can i solve this?
Thank you.