Skip to content

Instantly share code, notes, and snippets.

@jlr7245
Last active November 28, 2018 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlr7245/2522fc0211ae70f3fe73aad395a73080 to your computer and use it in GitHub Desktop.
Save jlr7245/2522fc0211ae70f3fe73aad395a73080 to your computer and use it in GitHub Desktop.
sample problem writeup

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment