The jQuery scroll event works just the .click() event, the main difference is that we usually want to bind it to the whole document (the webpage) rather than a specific div or img tag. So the event declaration will look like this:
//All your code will go here...
Note: This should be within the document ready function. In this function, […]