DropMe provides drag and drop features for html elements using jquery.
- Internet Explorer 8+
- Chrome 10+
- Firefox 3.5+
- Safari 4+
- Opera 11+
- Less than 1KB
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');
Please see LICENSE.md for detail
Nitin Giri