Conditional scrolling of infinite menu

Can I make the scrolling of the infinite menu conditional on the y position of the mouse cursor?

I have fiddled with if functions to no avail, I only want the menu to move when the mouse is positioned within its borders: eg. not elsewhere on the page.