/dropMe

Drag and Drop html elements using jQuery

Primary LanguageCSSMIT LicenseMIT

DropMe Plugin

DropMe provides drag and drop features for html elements using jquery.

DEMO

Browser Support

  • Internet Explorer 8+
  • Chrome 10+
  • Firefox 3.5+
  • Safari 4+
  • Opera 11+

Size

  • Less than 1KB

Usage

For List with Object to insert data var options = { contId:'ID to insert list', elem:[{id:1,title:'nitin'},{id:2,title:'ankit'},{id:3,title:'himanshu'},{id:4,title:'prashu'}] } $('.dropme').dropme(options);

Use dropme method to create a draggable list:

$('.dropme').dropme();

Use sortupdate event if you want to do something when the order changes:

$('.dropme').dropme().bind('sortupdate', function(e, elm) {
    //Triggered when the position has changed.
});

Use items option to specifiy which items inside the element should be sortable:

$('.dropme').dropme({
    items: ':not(.disabled)'
});

Setting 'replacerSize' option to true, forces the placeholder to have a height:

$('.dropme').dropme({
    replacerSize: true 
});

Use linkTo option to create connected lists:

$('#id1,#id2').dropme({
    linkTo: '.connected'
});

To remove the sortable functionality completely:

$('.dropme').dropme('destroy');

To disable the sortable temporarily:

$('.dropme').dropme('disable');

To enable a disabled sortable:

$('.dropme').dropme('enable');

LICENSE

Please see LICENSE.md for detail


Author

Nitin Giri