I have the following code, when a checkbox is clicked it creates a div with some info. However in that div I added an anchor tag to remove the div itself.
However, I am not sure how to remove the div on the link click because the div is dynamically generated.
//Add selected job in the results div
function AddSelectedJob(id, display) {
//create a div for every selected job
$("[id$=ResultsDiv]").append('<div class="selectedjobs" id=' + id + '>' + display + '<a href="#">Remove selected job</a></div>');
}