Skip to content

Instantly share code, notes, and snippets.

@vanderhoop
Created February 10, 2015 18:34
Show Gist options
  • Save vanderhoop/7a760791b63df532c925 to your computer and use it in GitHub Desktop.
Save vanderhoop/7a760791b63df532c925 to your computer and use it in GitHub Desktop.

Puppy Parallax Process

Answer the questions below in the order they appear:

  1. What DOM node do you want to add a 'scroll' event listener to?
  • Answer: the window object
  1. How can you ensure your 'scroll' event listener is firing?
  • Answer: add a console.log to the event listener's callback function
  1. How can you determine how far the user has scrolled?
  • Answer: $(window).scrollTop(); returns an integer
  1. How can you change the puppy styling position?
  • Answer: jQuery's .css method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment