Prevent Scrolling - temporarily

Prevent Scrolling - temporarily

dtmnashdtmnash Posts: 6Questions: 0Answers: 0
edited October 2013 in General
We are using scroller with server side processing and would like to stop the user from scrolling when we reach the point where an ajax request will be made then reenable it once the next page is loaded. Has anyone tried this? Examples?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Not as far as I'm aware. I think you'd probably need to hack Scroller and add a preventDefault() to the scroll event on the container when it does happen.

    Allan
  • dtmnashdtmnash Posts: 6Questions: 0Answers: 0
    we were able to accomplish this by doing the following:

    1) In the _fnScroll method we added a call to a method that will disable scrolling from the mouse, keyboard, and also hides the Yscrollbar from view.

    2) in datatables init we added a method on fnDrawCallback to reenable scrolling
This discussion has been closed.