Neolithic Populous Metropolis
    Wondering what’s next for npm?Check out our public roadmap! »

    scrollable-elements

    0.0.2 • Public • Published

    scrollable-elements

    Build Status npm version License

    Get scrollable elements in specified selector.
    Work in IE 9+ and modern browsers.

    There are no dependencies on this module.

    Install

    Installed from npm.

    $ npm install scrollable-elements
    

    API

    findAll( selectors, direction )

    selectors: String
    direction: String("x" | "y") Default("y")

    Get all scrollable elements from in specified selector.
    It returns an empty array if the element is not found.

    import {findAll} from "scrollable-elements"
     
    const elements = findAll(".scrollable");
    console.log(elements); // [Element, Element, ...]

    find( selectors, direction )

    selectors: String
    direction: String("x" | "y") Default("y")

    Get first found scrollable element in specified selector.
    It returns an undefined if the element is not found.

    import {find} from "scrollable-elements"
     
    const element = findAll(".scrollable");
    console.log(element); // Element

    Author

    tsuyoshi wada

    Install

    npm i scrollable-elements

    DownloadsWeekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • avatar