Skip to Navigation or
Skip to Content

Jquery Mobile Drag And Drop

Jquery Mobile Drag And DropQuick Links

Visit the jQuery Mobile Drag And Drop project hub, which has a demonstration and download for this plugin on JS Plugins JavaScript Plugin Library.

Mobile Drag And Drop Demonstration.

Description

The jQuery Mobile Drag And Drop project is a plugin for the jQuery JavaScript Framework, which provides a drag and drop interface on desktop browsers with fallback "tap to lift" and "tap to drop" interface on touch-screen mobile devices.

Requirements

CSS

/* Recommended styles */
		
		.drag {
			float: left;
			width: 21%;
			background-color: Green;
			color: White;
			margin: 10px 2%;
			cursor: move;
			text-align: center;
			-moz-border-radius: 1em;
			-webkit-border-radius: 1em;
			border-radius: 1em;
		}
		
		.selected {
			background-color: Yellow;
			color: Black;
		}
		
		.drop {
			background-color: Blue;
			color: White;
			margin: 3px;
			padding: 10px;
			-moz-border-radius: 1em;
			-webkit-border-radius: 1em;
			border-radius: 1em;
		}
		.active {
			background-color: orange;
			cursor: crosshair;
		}

JavaScript

$(".drag").mobiledraganddrop({ targets: ".drop" });

With all options set:

$(".drag").mobiledraganddrop({
    "classmodifier": "mobiledraganddrop",
    "targets": ".drop",
    "status": "",
    "selectedclass": "selected",
    "activeclass": "active"
});

 

You Are Here: Home » JavaScript » Mobile Drag And Drop


I use a cookie on this website. This cookie doesn't contain or relate to any personal information and it isn't shared with any other website, it just ensures that I don't count you more than once in my website statistics. The Privacy and Electronic Communications Regulations require me to ask your permission to use this cookie, so please indicate below that you are happy for me to do this - I will remember your selection with a cookie, so if you accept I won't ask again...