johnny / johnny/jquery-sortable

jquery-sortable is conflict with jquery ui.

Open
#223 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
HTML
Stars
1.5k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

jquery-sortable is conflict with jquery ui.

I want to have a list that is sortable, but I also want the elements in that list to be droppable to the divs
I have defined as group.
it working fine with out jquery ui.
but in my project other component ( pivot table js ) is depends on jquery ui .
when i load a jquery ui group div drop function not working.

` $("ol.connected").sortable({
group: 'connected',
pullPlaceholder: false,
exclude: '#dropMessage',
onDrop: function ($item, container, _super) {

```
if ($item.hasClass('Blank_column') && $(container.el).attr("id") !== 'perameterInColumnSetting') {
$(this).sortable("cancel");
} else {
var containerId = $(container.el).attr("id");
var btnAction = $item.find("button");
if (btnAction.find("i").hasClass("fa-plus-circle") &&
containerId === "perameterInColumnSetting") {
$item.removeClass('selected');
$item.removeClass('selected').find(".icon-check").remove();
self.createBtnType(btnAction,"REMOVE");
} else if (btnAction.find("i").hasClass("fa-times") &&
containerId === "perameterNotInColumnSetting") {
$item.removeClass('selected').find(".icon-check").remove();
self.createBtnType(btnAction,"ADD");
}
_super($item, container);
self.setDropMessage();
}
},

// set $item relative to cursor position
onDragStart: function ($item, container, _super) {
var offset = $item.offset(),
pointer = container.rootGroup.pointer;

adjustment = {
left: pointer.left - offset.left,
top: pointer.top - offset.top
};

_super($item, container);
},
onDrag: function ($item, position) {
$item.css({
left: position.left - adjustment.left,
top: position.top - adjustment.top
});
}
});`
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.