Giter Site home page Giter Site logo

Triggering rewritten about infinite-scroll HOT 5 CLOSED

metafizzy avatar metafizzy commented on April 27, 2024
Triggering rewritten

from infinite-scroll.

Comments (5)

samcleaver avatar samcleaver commented on April 27, 2024

I think the way you suggest is correct; the jQuery docs themselves suggest this kind of format (which is along the lines of your suggestion):


$('div').infinitescroll(); // calls the init method
$('div').infinitescroll({  // calls the init method
  foo : 'bar'
});
$('div').infinitescroll('pause'); // calls the pausemethod
$('div').infinitescroll('stop', 'A variable to pass along'); // calls stop method and ending message

Obviously the idea is to make the plugin as modular as possible, i.e. we could add other methods at a later date.

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

Perfect. I should have this done in a few hours or by tomorrow morning (London time).

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

Pretty sure this is in the bag.

I'll be testing this thoroughly tomorrow, but I think this also justifies a version to update 1.6. Once tested properly, I'll be pushing it to the repo.

http://pastebin.com/sayvVEm4

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

Boom, this is done. The only thing we don't have support for is where options are blank, like so...

$('#your-selector').infinitescroll()

I can add this in, but not sure if it's a good idea. I have a feeling it would cause a flood of issues for 'why doesn't this work?' when the plugin/markup hasn't been setup properly.

from infinite-scroll.

paulirish avatar paulirish commented on April 27, 2024

+1 !!!!

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.