Hi there,

I would imagine this is because when you scroll past the last sub menu, that section then closes and it jumps back up. Usually if you were to do this effect it would pop the menus out of the side instead of a drop down if using css. Try the following css

#mainmenu ul.sub-menu {
padding-left: 0;
position: absolute;
top: 0;
left: 100%;