I am having trouble getting the image to appear when I click on the button.
Here is what I would like to happen:
- The user can click on the button.
- When the button has been clicked on,
- an image of a dragon appears.
Here is what is currently happening:
- The button shows up on the page and the user can click on it.
- However, when the button has been clicked on, nothing shows up.
I have attached an event listener to the button, and I am console.logging "hello world" in the function that runs when the button is clicked. The console.log is printing to the console successfully, and I am not seeing any errors in the console.
Perhaps I am adding the image wrong?
The code for this is here: (link to code). I've also looked at (link to stackoverflow question) and (link to MDN documentation / link to jQuery documentation).