metafizzy/infinite-scroll-docs

Name: infinite-scroll-docs

Owner: Metafizzy

Description: ? Documentation for Infinite Scroll

Created: 2017-06-08 18:15:09.0

Updated: 2018-04-30 20:18:37.0

Pushed: 2018-04-23 12:54:21.0

Homepage: null

Size: 135

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Infinite Scroll docs

Documentation for Infinite Scroll, the JavaScript library for automatically adding next pages.

infinite-scroll.com

Install

Building these docs requires npm and Bower.

install
r install
Tasks
Structure
Modules

Modules are re-usable components used throughout the site. A module may consist of template, JS, and CSS files.

modules/
  page-nav/
    page-nav.css
    page-nav.js
    page-nav.hbs

BEM is used for CSS code style.

e-nav {} /* block */
e-nav__item {} /* element, child */
e-nav--dark {} /* modifier */

JavaScript can be initialized for each element with data-js attribute.

 class="page-nav" data-js="page-nav">
js
niteScrollDocs.['page-nav'] = function( elem ) {
 do something with elem


By Metafizzy


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.