How to change page lenght dropdown to links?

How to change page lenght dropdown to links?

SwanSwan Posts: 17Questions: 0Answers: 0
edited June 2010 in General
Hello!

I've changed number of items in dropdown to shown 10, 25, 50, 100 and all items per page.

Then I saw that on this page which have DataTables plugin have links instead of dropdown.
http://www.travellerspoint.com/guide/London/#Sleep

Does somebody have example of how to achieve this?


Thanks!

all the best

Replies

  • SwanSwan Posts: 17Questions: 0Answers: 0
    No ideas? :/
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    There is an example of how to do this here: http://datatables.net/usage/i18n#oLanguage.sLengthMenu

    Also the 1.7 betas introduce aLengthMenu: http://datatables.net/beta/1.7/examples/advanced_init/length_menu.html ( http://datatables.net/new/1.7 ) which makes this somewhat easier.

    Regards,
    Allan
  • SwanSwan Posts: 17Questions: 0Answers: 0
    Awesome! Thanks for your help. I will check this. :)


    all the best
  • SwanSwan Posts: 17Questions: 0Answers: 0
    Hello!

    I've checked this but I have no clue how to change dropdown into links? Can you please provide me some more information?


    Thanks!
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Sorry I misunderstood what you were looking for. What you want to do is make use of this plug-in http://datatables.net/plug-ins/api#fnLengthChange and attach an event handler to the links, such that when they are clicked on, then that function will be called with the length that you want to be displayed.

    Allan
  • SwanSwan Posts: 17Questions: 0Answers: 0
    Hey!

    No problem. When I re-read my first post I've found out that is not written good.

    Thanks for new tip. I will try to do this although I think that my JS/jQ skills are not so good to achieve this but at least I can add some new mission to my to-do list... :)


    Thanks!
This discussion has been closed.