Code Monkey home page Code Monkey logo

simple-load-more's People

Contributors

dependabot[bot] avatar frontendschlampe avatar johnsonkit avatar zeshanshani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simple-load-more's Issues

Customize how the list is displayed

Great little plugin. Light-weight, easy to implement, and works like a charm. The only thing missing is a custom variable to set how the next list of items will be displayed. Currently clicking the 'Next' button uses fadeIn(), but an option to allow for i.e. slideDown() would be a great addition.

Adding a callback function for when the list is exhausted

Is there a way to implement a Callback function when the list is completely shown (and the ‘More’ button is hidden)? Meaning, when the last items are displayed to the user, is there a way that I can detect that and trigger a function of my own to do additional processing.

What I’m trying to do is get the next set of records from the database (via AJAX) so the user can ‘transparently’ continue viewing them, until all the records are exhausted.

BTW: I have implemented simple-load-more throughout the app and it works great! I think adding this little feature will make it a more robust tool since it will then not be limited to just the initial retrieve/list display.

Update or Refresh callback

Can we have an update or refresh callback if, for instance, we are sorting through a list and are removing/hiding some items?

Count element showed/total and count view more clicks

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.

    Ability to wrap HTML around the 'MORE' button

    Opening this thread on request of @MicJarek

    I will be creating a new option using which you can wrap the 'MORE' button in HTML. The purpose is to allow users to apply custom classes and styles on the button. E.g., horizontally centering the button

    Bottom Center btnHtml

    I'm trying to position the btnHtml on bottom center with TailwindCSS but without success, here's the code

      <script>
    $('.gallery').simpleLoadMore({
      item: 'div',
      count: 180,
      btnHTML: `<a href="#" class="load-more__btn rounded-2xl bg-white text-red-500 px-5 p-2 font-bold mx-auto">View More <i class="fas fa-angle-down"></i></a>`,
    });
      </script>

    Result:
    image

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.