move-master
🔨 Move ANY element on page
Demo 🎉
https://codepen.io/piecioshka/full/dXAJdq/
How it works?
We have for instance that structure in DOM:
Create in JavaScript file reference to that element:
var logo = document;
Next, run that one line, to enable logo moving:
;
To enable moving on selected HTMLElement.
API
In settings:
target
- HTMLElement which will be movedparent
- HTMLElement of parent element, which will be calculate position.- Default
document.body
.
- Default
hook
- HTMLElement of another element near moved object.- Default
null
.
- Default
License
The MIT License @ 2014