• Resolved mehmetba

    (@mehmetba)


    Currently I am using something similar to the following:

    [loop paged=15 query=pg] [/loop]
    
    [loopage query=pg prev_next=false show_all=false]

    It works good and displays the pagination numbers at the end of the page. But there are too many pages (more than 40) and I want both a tidy and compact display and an easier accessibility to all pages.

    Is it possible to display the page numbers in a drop-down list?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • use parameter list=true and format with css as needed

    Thread Starter mehmetba

    (@mehmetba)

    Thanks for your guidance. If anyone comes across this issue, I used parameter=true and then used the following JQuery code to convert the ul li tags created by the CCS into a drop-down list:

    jQuery(document).ready(function($) {
      $('ul.pagination').each(function() {
        var list = $(this),
          select = $(document.createElement('select')).insertBefore($(this).hide()).change(function() {
            window.open($(this).val(), '_self')
          });
    
        $('> li a, > li span', this).each(function() {
          var option = $(document.createElement('option'))
            .appendTo(select)
            .val(this.href)
            .html($(this).html());
          if ($(this).hasClass('current')) {
            option.attr('selected', 'selected');
          }
        });
        list.remove();
      });
    });
    • This reply was modified 3 years, 10 months ago by mehmetba.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display page numbers in a drop-down list’ is closed to new replies.