stack-component

0.0.1 • Public

stack

Stack your dom nodes

Installation

Install with component:

$ component install bredele/stack

API

Stack(parent)

Stack constructor. Create a stack from a parent dom element.

var stack = new Stack(document.body);

add(name, dom [, bool])

Identify a dom element by name and push it into the stack. The optional boolean allows to set the current child in the stack (visible one).

stack.add('olivier', document.querySelector('.olivier'));

show(name)

Display a stacked element into the parent dom element.

stack.show('olivier');

License

MIT

/stack-component/

    Package Sidebar

    Install

    npm i stack-component

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Collaborators

    • bredele