0.0.1 • Published 8 years ago

component-align v0.0.1

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

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'