Skip to content

A vanilla JavaScript library to allow for element dragging and drag threshold notification.

License

Notifications You must be signed in to change notification settings

iec989/mickdragger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Original module: https://github.com/Juicetan/mickdragger Original author: Juicetan

Getting Started

  1. Fetch the plugin

    The plugin is available using the Node Package Manager(npm)

    $ npm install iecdragger --save
  2. Include plugin script

    <script>
       import mickdragger from 'iecdragger';
    </script>
  3. Create a instance of MickDragger with DOM element

    var $dragEl = document.querySelector('.drag');
    var mickDragger = new MickDragger($dragEl);
  4. Add event listener

    mickDragger.on(MickDragger.event.THRESHOLD, function(){
      // do awesome things
    });

API

You can follow the instructions here: https://github.com/Juicetan/mickdragger

Options

On top of the ones included here: https://github.com/Juicetan/mickdragger

Name Default Description
stopPropagation true|false Stops the propagation when dragging the element.
verbose true|false Print events in the console.

Constants

You can follow the instructions here: https://github.com/Juicetan/mickdragger

About

A vanilla JavaScript library to allow for element dragging and drag threshold notification.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 52.0%
  • JavaScript 48.0%