Skip to content

Instantly share code, notes, and snippets.

@vanderhoop
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save vanderhoop/0a34fb520b3d7c01d8d8 to your computer and use it in GitHub Desktop.

Select an option

Save vanderhoop/0a34fb520b3d7c01d8d8 to your computer and use it in GitHub Desktop.

Timers Continued

We just added some timers to our page as a class. Now it's your turn.

Directions

  1. use setInterval to add a <p> tag to the page every 5 seconds. The new paragraph tag should read, "Nah nah nah nah nah nah, nah nah nah, hey Jude"
  2. Set a timeout so that after 15 seconds on the page, an <p> tag appears. The <p> should be red in color and read, 'Wow, you must really like this page...'
  3. Add a click event listener to the lone<button> element on the page. This listener should disable the interval and the timeout that you set in #2 and #3, respectively, as well as remove the button from the DOM (We won't be needing it anymore).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment