Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
/ dragdrop Public

A small javascript dragdrop library that handles drag n drop and let you focus on implementation details

Notifications You must be signed in to change notification settings

bomsy/dragdrop

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dragdropjs

A small javascript library that handles drag n drop, letting you focus on your implementation details Aim to ease the difficulties in implementing drag n drop.

Progress

Still under development

Cross browser support

Currently supports ie7+, chrome, firefox, opera and safari.

Loading the javscript file

(function(d){
  if(d.getElementById(id)) {
      var js,
    	id = "dragdrop-js",
  		ref = d.getElementsByTagName('script')[0];
  		js = d.createElement("script");
  		js.id = id;
  		js.type = "text/javascript";
  		js.src = "/js/dragdrop/dragdrop.js";
  		js.async = false;
  		js.onreadystatechange = function () {
  			if (js.readyState === "loaded" || js.readyState === "complete") {
  				js.onreadystatechange = null;
    			DRAGDROP.onDragBegin = function (dragElement) {
    	            //your code to run on drag begin
                };
        	    DRAGDROP.onDrag = function (elementBelow, dragElement) {
                    //your code to run on drag
        	    };
        	    DRAGDROP.onDrop = function (dropElement, dragElement) {
                    //your code to run on drop
        	    };
            }
  		}
  		ref.parentNode.insertBefore(js, ref);
  }
})(document)

Examples

About

A small javascript dragdrop library that handles drag n drop and let you focus on implementation details

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.