Skip to content
This repository

Extends jQuery UI Draggable to add Multi Element Drag and Live functionality

branch: master

Update multidraggable.js

Cool new pattern - add undefined to function params. Protects from unexpected modifications of undefined out of my lovely plugin :P
latest commit 3ee04bf041
Sudheer Someshwara authored
Octocat-spinner-32 README another typo fix January 28, 2012
Octocat-spinner-32 multidraggable.js Update multidraggable.js November 13, 2012
Octocat-spinner-32 test.html Final Version January 28, 2012
Octocat-spinner-32 test.js Final Version January 28, 2012
README
Description

Multi Draggable provides live and multi element draggable functionality to jQuery UI Draggable. 


Usage:

1. Can you used same way as you do for Draggable. In addition, you can add "group" option, which determines which group of elements to be dragged together.

Ex 1:  $(".className").multiDraggable({ group: $(.className)});

In the above case, dragging any element that matches .className , drags all elements matching .className to drag together.

Ex 2:  $("#drag1").multiDraggable({ group: [$("#drag1"),$("#drag2") ]});

In this case, dragging #drag1, makes #drag2 drag along with it, even though #drag2 is not draggable.

Ex 3: (".className").multiDraggable({ 
                      group: $(.className),
                      startNative: function (event,ui) {},
                      stopNative : function (event,ui) {},
                      dragNative : function (event,ui) {}
                      });

You can use all events, options and methods of jQuery UI Draggable, except that
  -'start' is now 'startNative'
  -'drag' is now 'dragNative'
  -'stop' is now 'stopNative'
  - everything else remains the same.
Something went wrong with that request. Please try again.