zeshanshani/simple-load-more

Count element showed/total and count view more clicks

kant1983 opened this issue · 1 comments

I was asking if there was the possibility to insert, first of the button "View More", the number of current elements showed / number of total elements. It would be great if after click on View More the counter of current news was updated. I make a simple example. If I have this configuration, with 50 elements:
count: 10, itemsToLoad: 5

  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
  • Item 6
  • Item 7
  • Item 8
  • Item 9
  • Item 10
  • Number of news: 10/50
    View more >

    After the click of the button view more the elements will be 15 and the counter of the current elements will be 15/50 until to get all the elements. Another appreciate issue would be the number of clicks, before View More button until to get the end of elements. In the previous example, given a total of 50 elements, starting with 10 and increasing of 5 elements each time, it should be so:

    Number of news: 10/50
    [-8] View more >

    After the click of "View more" button, the counter of clicks decrease until to get -1, when it arrives to 0 it means we have showed all the elements and so both counter click and view more button is not showed.

    Hi @kant1983,

    This is ready in version 1.4.0. Read options to learn more about it. View demo for the examples.

    Thanks,
    Zeshan