Using jQuery, I would like to disable scrolling of the body:
My idea is to:
body{ overflow: hidden;}
This may or may not work for your purposes, but you can extend jScrollPane to fire other functionality before it does its scrolling. I've only just tested this a little bit, but I can confirm that you can jump in and prevent the scrolling entirely. All I did was:
positionDragY(destY, animate)
functionFire up events.html, and you'll see a normally scrolling box which due to your coding intervention won't scroll.
You can control the entire browser's scrollbars this way (see fullpage_scroll.html).
So, presumably the next step is to add a call to some other function that goes off and does your anchoring magic, then decides whether to continue with the scroll or not. You've also got API calls to set scrollTop and scrollLeft.
If you want more help, post where you get up to!
Hope this has helped.