$(function() { $(document).on("click", '#mydiv', function() { alert("You have just clicked on "); }); });