I am trying to add a click event on some dynamically loaded content and I have this:
$("#dailyCount table thead th").each(function(){
var yd = "#" + $(this).attr("id");
$(document).on("click", yd, function(){
alert("a");
});
});
The element id is from 1 to the last day of current month. Any ideas ?