0.0.1 • Published 2 years ago
stack-component v0.0.1
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