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

  • Home
  • SEARCH
  • 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 7509873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:03:33+00:00 2026-05-29T23:03:33+00:00

I am making a load more paginate button, I’m stuck at two things that

  • 0

I am making a load more paginate button, I’m stuck at two things that are both similar. I don’t have a way of increasing pages, and I don’t have a way for the script to know when the paginate is finished. Here is my jQuery code for the load more:

$(document).on('click', '#loadmore', function() {
     $.get('/artistprofileloadmore.php?page=2&aid=$aid', function(data) {
    $("#append").append(data);
    });
});

I can easily solve this if there is a way for the jQuery to receive a variable value from the php file. So is there? Simply put, if the paginate is finished, the variable $end=1 is set, otherwise it is set to 0, is there a way I can use the jQuery to check when the variable $end==1 and then I would remove the div #loadmore to remove the next page button.

For the next page, is there a way that I can set jQuery to increase a variable every time it is run, which will increase the page number? The variable would be used instead of this two:

?page=2

and increase every click

  • 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-29T23:03:34+00:00Added an answer on May 29, 2026 at 11:03 pm

    From PHP return a JSON like this
    {"artists"="The Artists profiles","isLast"=true}

    var pageNum = 1;
    $(document).on('click', '#loadmore', function () {
        $.get('/artistprofileloadmore.php?page=' + pageNum + '&aid=$aid', function (data) {
            $("#append").append(data.artists);
            if(data.isLast){
              $('#loadmore').hide();
            }else{
               pageNum++;
            }
        });
    });
    

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

Sidebar

Related Questions

I have a main page from where I am making a call to load
I have a large activity that contains 100 or more buttons. But it's working
I have a persistence ignorant domain model that uses abstract repositories to load domain
I am making a simple page load counter by storing the current count in
Making my first steps with NHibernate, I'm trying to have it creating my Tables
Making an adobe flex ui in which data that is calculated must use proprietary
Making UML sequence diagram in VS 2010RC I've observed that there is no activation
I have built a horizontal scrolling website. I don't really know much about Java
How can I load a JAR file from a URL in Java while making
working on making a flash program that loads about 1000 jpegs and then plays

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.