Giter Site home page Giter Site logo

Comments (3)

lukeshumard avatar lukeshumard commented on April 27, 2024

What version of the plugin are you using? In the latest 2.0beta, you can do $('#selector').infinitescroll('scroll');. Any version of 1.5 will automatically trigger the scroll event.

from infinite-scroll.

WanderingZombie avatar WanderingZombie commented on April 27, 2024

Thanks Luke. Works a treat with 2.0b2.110617 from last week.

having passed an anonymous function for the errorCallback parameter, I would expect that to be called if I invoke

$('#selector').infinitescroll('scroll');
more times than there are available pages to load. However, unless I phyiscally scroll the page with my mouse this doesn't get called at all.

I want to be able to load more content whilst there is no scroll bar ($(window).height() == $(document).height()), but whilst there is also more content to load (isDone is not true).

Can this be achieved another way without errorCallback (as it's not being fired)?

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

The basic logic of this goes...

scroll / retrieve / _loadcallback / (if no content left) errorCallback

I think you might want to use retrieve instead of scroll. scroll will only fire the retrieve event if...
a) all of the options like isDone, isPaused, etc. aren't active, and (more importantly)
b) _nearbottom returns true, which is what I'm guessing you're having issues with.

retrieve is also a public method, so you could simply call this in place of scroll. Let me know how that goes!

from infinite-scroll.

Related Issues (20)

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.