Newton's Principia Mathematica

    move-master

    2.0.1 • Public • Published

    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:

    <img id="logo" src="..." alt="Logo" />

    Create in JavaScript file reference to that element:

    var logo = document.querySelector('#logo');

    Next, run that one line, to enable logo moving:

    MoveMaster({
        target: /* HTMLElement */ logo,
        options: document.body,
        hook:  /* HTMLElement */ button
    });

    To enable moving on selected HTMLElement.

    API

    In settings:

    • target - HTMLElement which will be moved
    • parent - HTMLElement of parent element, which will be calculate position.
      • Default document.body.
    • hook - HTMLElement of another element near moved object.
      • Default null.

    License

    The MIT License @ 2014

    Keywords

    none

    Install

    npm i move-master

    DownloadsWeekly Downloads

    0

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    6.33 kB

    Total Files

    5

    Last publish

    Collaborators

    • piecioshka