Back to Top

Back to Top

UnknownUnknown Posts: 4Questions: 0Answers: 0
edited April 2013 in General
Is it possible back to the top automatically after the visitors switch the pages?
It will be a problem when if need to scroll up and down for every 50-100 records.

Thanks.

Replies

  • UnknownUnknown Posts: 4Questions: 0Answers: 0
    Edit: This post looks like the solution for me. But I cant really understand what should I edit..

    http://datatables.net/forums/discussion/158/autoscroll-to-top/p1
  • UnknownUnknown Posts: 4Questions: 0Answers: 0
    Just did what allan said at the end and it can goes back to the top now.

    Since I have multi tables, i change the line to:
    var targetOffset = $('.name').offset().top;

    But it looks like the script cannot detects it. I have to manual add another id on top instead of pulling the .name class. Are there any better solution? Not really sure how to modify mine one like strannic's..
  • allanallan Posts: 63,520Questions: 1Answers: 10,473 Site admin
    The code in the linked thread looks like it should work over multiple tables. Can you link to a test case showing the problem that you are having please?

    Allan
This discussion has been closed.