Page 1 of 1

How can I Implement a Load More Button with Ajax?

Posted: Fri Jan 01, 2021 5:01 pm
by ilteris
greetings to friends, thank you for this wonderful script. I am considering to be a patreon soon!

the question I want to ask is, has anyone ever made a load more-style plugin using ajax before?

I learned a little bit to do this in a SQL-based php structure, but I couldn't do it with a script like bludit.

So the question I want to ask is to create the pagination part in the form of load more and in the form of an infinite loop.

so as an example,

Code: Select all

<script>
$(document).ready(function(){
  $("button").click(function(){
    WHAT SHOULD I INSERT HERE?
  });
});
</script>
Thank you in advance,

Re: How can I Implement a Load More Button with Ajax?

Posted: Tue Jan 12, 2021 7:43 am
by ilteris
hi,

I solved the problem by using a javascript called 'clever infinity scroll'.

I simply introduced the article divs and gave the URL that belongs to bludit paginator as the next page url.

paginator::nextpageurl()

it's working fine now, I can share the codes with someone who needs it.

regards,

Re: How can I Implement a Load More Button with Ajax?

Posted: Tue Jan 12, 2021 7:35 pm
by abdulhalim
Hey,
Sounds delicious :D
Please share your code here to use by members if it's OK by you.
Thank you

Re: How can I Implement a Load More Button with Ajax?

Posted: Sat Jan 16, 2021 8:00 am
by ilteris
hey,

i am not sure if it will be avaliable to share a link with you about the javascript.

But you can find it by simply searching 'jQuery Infinite Scroll Plugin - Clever Infinite Scroll'

it has a MIT license and completely free.

I guess there are various scripts that you can implement for Bludit, but since Bludit's paginator works as ?page= this plugin can work for it.

Regards :)

Re: How can I Implement a Load More Button with Ajax?

Posted: Fri Nov 19, 2021 10:14 am
by chrlyclsjs
Hi,

I would like to implement this on my main page which now contains al lot of articles and is very slow to load on the webbrowser.

Would it be possible to detail a little bit more how you realized that ? A piece of code would be very nice :)

Thanks very much
:)