Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7601513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:10:53+00:00 2026-05-30T23:10:53+00:00

I am using a pagination plugin called pajinate, i need to provide a Show

  • 0

I am using a pagination plugin called pajinate, i need to provide a Show All option, so I am passing in the index of my ajax call to the “item_per_page”. Everything works great, but I need to add 1 to the index, so i get the full results.

When i set the “item_per_page” to just “i”, it works, when i set it to “i + 1”, it does not. Doesn’t make sense to me:

$.ajax({
    url: "search-by-department-621650415.json",
    cache: true,
    dataType : 'json',

    success : function(results) {
        var employeeData = [];
        var totalNum;
        var startNum = 9;   
        $.each(results.data, function(i, item){
            employeeData.push({
                departmentName: item.departnemtName,
                firstname: item.firstName,
                lastname: item.lastName,
                phonework: item.workPhone
            });

            totalNum = i; 
            //totalNum = i + 1; breaks when i do this!!
        });

        $('#employee-name-results').tmpl(employeeData).appendTo('#name-results-container');

        Pagination(startNum);

        $("a.showall").click(function() {
            Pagination(totalNum);
        });

    } 

});


function Pagination(itemsPerPage) {
    $('#paging_container-1').pajinate({         
        items_per_page : itemsPerPage,
        num_page_links_to_display : 8,
        abort_on_small_lists: true,
        nav_label_prev : '<img src="images/icons/icon_prev.png"  />',
        nav_label_next : '<img src="images/icons/icon_next.png"  />'
    });
    console.log(itemsPerPage);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:10:55+00:00Added an answer on May 30, 2026 at 11:10 pm

    found the if statement in the Plugin:

    if (options.abort_on_small_lists && options.items_per_page >= $items.size()) return $page_container;

    Needs to be:

    if (options.abort_on_small_lists && options.items_per_page > $items.size()) return $page_container;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the datatables JQuery plugin. I use it with AJAX and pagination (server-side).
I am using Pajinate – A jQuery Pagination Plugin for pagination in my page
I am using following class to show a grid like appearance with pagination on
I have already implemented some AJAX pagination in my Rails app by using the
I am using Easy Pagination plugin to paginate some content. The problem is that
I am using plugin Kaminari for pagination. I am Ajaxifing my application and I
I am using the jQuery plugin DataTables ( http://datatables.net ) for pagination, search capabilities
I'm using Jquery Mobile pagination plugin and trying to work it into a plugin
OK so here is the deal I am using a plugin called stray quotes
Is there any way to achieve this? I am using a pagination plugin that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.