Keyword

K2 - AJAX Pagination - load more items

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 6 days ago #171018 by Fotis
Fotis replied the topic: K2 - AJAX Pagination - load more items
That is correct, given you only show the "leading" items block.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #171049 by Dimitris
Dimitris replied the topic: K2 - AJAX Pagination - load more items
ok I got it to work!
I think my mistake was that I had placed the "load more" button outside the k2 wrapper.
I still had to replace $ with jQuery because I was getting an TypeError: $ is undefined - the same happened with beez3 template

Thank you

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 4 days ago #171061 by Fotis
Fotis replied the topic: K2 - AJAX Pagination - load more items
You're welcome.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

More
2 weeks 3 days ago - 2 weeks 2 days ago #171075 by Dimitris
Dimitris replied the topic: K2 - AJAX Pagination - load more items
Even though it works I've noticed something, that it might not cause any issues in the default templates, it does though cause issues with mine.


The structure is:
#itemListLeading
  .itemContainer
  .itemContainer
  .itemContainer

The way I understand append, the extra items should be loaded under the last itemContainer

Instead the script creates this:
#itemListLeading
  .itemContainer
  .itemContainer
  .itemContainer
  #itemListLeading
    .itemContainer
    .itemContainer
    .itemContainer

why is it duplicating the content div? Having two divs with the same id is not exactly correct either.

obviously I don't have a clue what I'm talking about, but it might have to do with this line?
var items = $(data).find('#' + newsContainer);
Last Edit: 2 weeks 2 days ago by Dimitris.

Please Log in or Create an account to join the conversation.

More
2 weeks 1 day ago #171089 by Dimitris
Dimitris replied the topic: K2 - AJAX Pagination - load more items
well I did manage to get the results I wanted by changing
var items = $(data).find('#' + newsContainer);

to
var items = $(data).find(".itemContainer");

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 week 5 days ago #171113 by Fotis
Fotis replied the topic: K2 - AJAX Pagination - load more items
The example originally provided is a bit messy. I'll create a more modern equivalent using the default layouts and paste it back here in the coming days.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

Moderators: william white