I am creating a "to do list" javascript practice app.
I have an input, and a "submit button". the submit button uses the text in the input.value. The submit button has an onclick that creates a new div with a nested h3 with the text from the input.value. The submit button also creates an "x button" and a "complete button"
How can I create an onclick function for the "x button" which doesn't exist in the DOM until after I use the submit button?
I want the "x button" to delete the entire div that was created with the submit button that includes the aforementioned x button itself, as well as the h3 and complete button that were created with the submit button.