Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ampersand-infinite-scroll

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-infinite-scroll

Ampersand infinite scroll view

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

js-semistandard-style

ampersand-infinite-scroll

  • This module is still under development *

A simple ampersand module to be used with any view in need of an infinite scroll element. This module assumes that the collection associated with the view implemments a method collection.fetchPage() as so it is a perfect match to be used with ampersand-pagination-mixin.

This module works by binding a function to the scroll event that fires a collection.fetchPage() request whenever the user reaches the bottom of the page.

Example:

  var View = require('ampersand-infinite-scroll');

  var Collection = require('./myCollection');

  var SpecialCollection = Collection.extend({
    fetchPage: function() {
      this.add([
        {message: "This"},
        {message: "Is"},
        {message: "Am"},
        {message: "Awesome"},
        {message: "View"},
        {message: "!"}
      ]);
    }
  });
  
  // Extend it like you wold normally do
  var myView = View.extend({
    initialize: function () {
      console.log('My super awesome infinite scroll view');
    },
    collection: new
  });

Keywords

FAQs

Package last updated on 06 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc