Pagination - missing previous-next

Pagination - missing previous-next

GlennLanierGlennLanier Posts: 2Questions: 0Answers: 0
edited July 2009 in General
I love how quick dataTables are to attach to a table; however, I've had trouble with the pagination -- the next/previous/page numbers don't display.

I've stripped it down to the basics at http://www.lanierconsulting.net/datatables/datatables.html -- the information bar correctly shows 22 rows (showing 1-10 of 22). Any help would be greatly appreciated.

Replies

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Hi Glenn,

    Thanks for your kind words. The link is very helpful to see what is going on - what I think is happening is that the elements for the paging are actually put into the page (you can check this with a live DOM viewer such as Firebug, Web Inspector or whatever), it's just that there are no styles attached to the elements to make them visible! The default paging style requires a couple of images to be attached to the elements by CSS.

    Since you don't have any styling on the page at the moment, it might be easier for you to just try the alternative pagination style which does include text and numbers:
    http://datatables.net/examples/example_alt_pagination.html

    Regards,
    Allan
  • GlennLanierGlennLanier Posts: 2Questions: 0Answers: 0
    edited July 2009
    Augh! I can't believe I didn't look at the stylesheet. I saw the empty elements, but was expecting to see content in them. I added the appropriate styles (.paginate_X_Y - where X in [enabled|disabled] and Y in [next|previous]) and images and it is working as expected.

    Thanks for quick (and accurate) reply.

    FYI: I noticed you have a spell checker application. You might like to change the footer in the example pages from

    information about __it's__ API properties and methods

    to

    information about __its__ API properties and methods.
  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Hi Glenn,

    Good to hear that worked.

    Thanks for the tip about the it's and its. I'm always doing that... Part of the reason I wrote SprySpell :-). I've updated the files on my local copy and and I'll be updating the web-site with them soon.

    Regards,
    Allan
This discussion has been closed.