Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The Drag.Move.Inside class makes it easy to check if an element is inside another element while dragging one of the elements.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Demos
Octocat-spinner-32 Docs
Octocat-spinner-32 Source
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Drag.Move.Inside.png
Octocat-spinner-32 README.md
Octocat-spinner-32 package.yml
README.md

Drag.Move.Inside

The Drag.Move.Inside class makes it easy to check if an element is inside another element while dragging one of the elements.

Screenshot

How to use

Similar to Drag.Move, Drag.Move.Inside needs all of the same informations.

    new Drag.Move.Inside(document.id('drag'), {

        container: $$('#inside>div')[0],

        droppables: $$('#inside .drop'),

        onInside: function(element, droppable){
            droppable.setStyle('background', '#E79D35');
        },

        onLeaveInside: function(element, droppable){
            droppable.setStyle('background', '#6B7B95');
        },

        onDrop: function(element, droppable){
            if (droppable) droppable.setStyle('background', '#C17878');
        }

    });
Something went wrong with that request. Please try again.