I want something to happen when you scroll to a certain point, is this possible?

I saw the scroll() function, but im not sure thats what i want?

Example: I have a nav bar at the top and i want...