If I scroll, I apologize, "scrolling up" (.scrollTop () = 0), some function is assigned to "scroll with scroll up".
That is, if we "drag out" to the very top of the page (.scrollTop () = 0) and then once again, we turned the wheel of any "length" exclusively up (!), The function is executed.

Thank.

    1 answer 1

    First, you assign an event, and inside you check whether it is scrolled or not. It's easier.

    Another thing is, not all browsers understand the onMouseWheel event, keep in mind.

    • 2
      I will add the answer @ knes-a simple [primerchik] [1]. [1]: jsfiddle.net/Deonis/mo5gt68y - Deonis
    • Great guys. Thank you very much! - goddan
    • @Deonis, and why UI? It seems that without him everything must be plowed, no? - knes