Thank you! Your feedback has been delivered
Thank you! Your feedback has been sent

Load different content on second click

Hi,

On my website I have a gallery and there I am working with addItems from isotope. My question is: How can can I make it possible that on the second click on the \"Load more\"-button different content (or say in my case: the nest pictures) is loaded?

thanks in advance. best regards, yannic

User Gravatar

yannicn

Posted Jul 10 2013 19:16 UTC

$25


  • Assigned To NBoychev
  • Solved
  • jquery
    isotope
    ajax
  • 1086 Views

5 Replies


Hi yannic,

Can you provide a code sample or a link your to site?

User Gravatar

BadGoat

Posted Jul 10 2013 19:21 UTC

Hi BadGoat,

here is a link: http://www.koch-bergfeld.de/besteck/ausstellung/#gallery

I want to display in total about 200 pictures. When the page is load I want that there are let\'s say 20 pictures und the rest is being load step-by-step by clicking on \"load more\".

Can you help me here?

User Gravatar

yannicn

Posted Jul 10 2013 20:24 UTC

Hello yannicn,

Here you can see the new JavaScript code:

http://pastebin.com/6Uj6RN7x

You should use this code for the button:

<a href=\"ajax/entries-1.html\" data-max=\"4\" class=\"load_more\">Mehr anzeigen</a>

Where \'ajax/entries-1.htm\' is the file where the first elements are in, \'data-max\' is the maximum number of files that should be ajaxed (after that the clicks on the button will do nothing).

The files for ajax are here: https://www.dropbox.com/s/vdwr0v50q5w0avf/ajax.zip

Regards,

Nikola Boychev

User Gravatar

NBoychev

Posted Jul 10 2013 20:59 UTC

Solution

This didn't solve your task? Get your own custom solution.

Hi Nikola,

works perfect - many thanks !!!!

Do you want to send me your paypal so I can send you the 25$?

Regards, yannic

User Gravatar

yannicn

Posted Jul 10 2013 22:03 UTC

Ah just received an mail from codersClan :-)

User Gravatar

yannicn

Posted Jul 10 2013 22:34 UTC

Add a reply

By posting a reply on CodersClan you agree to our Terms & Conditions