WordPress.org

Forums

TablePress
[resolved] Previous / Next - not loading at top of page (4 posts)

  1. robbertl
    Member
    Posted 1 year ago #

    Hi,

    I have a very small issue with this excellent plugin.

    when I activate the previous/next button at the bottom of a talbe it works... but it does not bring the user to the top of the next page.

    i.e. page 1 has 1 - 50 entries, click on next button, table now shows 51 - 100 entries but remains at the bottom of the page/table, it does not bring the user back to the top of the table i.e entry 51.

    See example of what I mean at http://shatteredfates.com/about-us/dkp-testing/ (thats not my site - but it shows what I mean)

    Click on the next button at the end of the table... new entries load, but you remain at the bottom of the table.

    Is there a fix for this, to bring the user back to the top of the table when you click next?

    Thanks,

    http://wordpress.org/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your question, and sorry for the trouble.

    Unfortunately, I don't think that this can be changed. From what I know, this is the default and intended behavior of this feature from the DataTables JavaScript library (that TablePress uses here).
    I'm not aware of a method to change this, but you might want to check in the DataTables documentation or forums at http://www.datatables.net.

    Regards,
    Tobias

  3. robbertl
    Member
    Posted 1 year ago #

    Hi,

    Thanks for the prompt response.

    One more question... is it possible to include previous/next at the top of the table, if you opt out of the search bar on the top right?

    My temporary (lazy) solution to the original problem is to add a back to top link under the table.... needs must!

    Really excellent plugin, well done.

    Robbert

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Yes, moving the pagination to the top is possible with a "Custom Command" for the DataTables JavaScript library that adds the pagination to the table.
    For example, try adding

    "sDom": 'lfrpti'

    to the "Custom Commands" field on the table's "Edit" screen. The order of those letters determines the position, according to the documentation at http://datatables.net/usage/options#sDom

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic