component-align
v0.0.1
Published
align one element to another
Downloads
15,292
Readme
Align
Align one element to another with specified position.
Install
npm install component-align
Example
var align = require('component-align')
var yellow = document.getElementById('yellow')
var blue = document.getElementById('blue')
align(yellow, blue, 'bl-tl')
API
align(fromEl, toEl, position)
position could be 'tl', 'tc', 'tr', 'bl', 'bc', 'br', 'lc', 'rc'