so I dynamically create a paragraph with jquery using the append method, and I want to add a click event to it, but for some reason the click event does not work, I know that the solution is probably simple, but I am new to jquery and would be I appreciate any help ... I know that the code inside the function works because I tested it with a static button, it just does not work with a dynamic one. Thanks for any help
here is my code
$(this).parent().parent().children("div").append("<p class='tryAgain'>Try Again</p>");
click function code
$(".tryAgain").click(function() {......}
source share