I have set up jsFiddle to show what I want to achieve.
I have two divs (there can be more then two, but this is simple setup) with size of the parent window, so <body> will never scroll.
I want to bind an event listener to window.scroll so that if no other div is scrolled (nothing is scrolled) then .mainContent is scrolled.
For example if I'm scrolling on .sidebar, just scroll sidebar. But if my cursor is at the right edge and I scroll with the mouse wheel, then .mainContent should scroll, as if the body had overflow.
Do I explain it well?
My Question is how to detect if no other element is scrolled when I rotate my mouse wheel so I can scroll .mainContent in that case.