Answer the questions below in the order they appear:
- What DOM node do you want to add a 'scroll' event listener to?
- Answer: the
window
object
- How can you ensure your 'scroll' event listener is firing?
- Answer: add a
console.log
to the event listener's callback function
- How can you determine how far the user has scrolled?
- Answer:
$(window).scrollTop();
returns an integer
- How can you change the puppy styling position?
- Answer: jQuery's
.css
method