I have two blocks, "draggable" and "sortable". Inside "draggable" I have few items which I can drag them to "sortable".
I want to have the possibility to click an item inside "draggable" and automatically drag it into "sortable".
Here is my JS:
$(".sortableList").sortable({
placeholder: 'ui-state-highlight',
});
$('.sortableList').disableSelection();
$(".draggable").draggable({
connectToSortable: '.sortableList',
cursor: 'pointer',
helper: 'clone',
revert: 'invalid',
start: function (event, ui) {
$(this).addClass('testing');
}
});
and this is a jsbin
Any ideas how can I drag the elements to "sortable" by clicking on them ?
draggablesattached to thesortablelist from the static items you have around?