You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sortable.create(el, {
group: {
name: 'stocking',
put: false,
pull: 'clone'
},
onMove: function (evt) {
// et.to will always be the list you are over but evt.related
// will be === only the very first time evt.to changes
if (evt.related === evt.to) {
Sortable.utils.toggleClass(evt.to, 'highlight', true);
}
}
});
only problem is that there is nothing currently tracking the item you hovered over before hovering over this item, since the evt.from is the original list you are dragging from. I'm working on adding an evt.previous to do just this, but the dev branch has at least one issue that is slowing me down some. Note: The onMove handler is called on the sortable list the item is dragged from not the list/lists being hovered or dropped on.
+1 from me, this would be awesome, I'm dragging from one list to a sortable one and would like to be able to remove some classes from the dragged element when its hovering in the drop area!
Reacted by Matthew Theo, Nikola Kostadinov, macgyver76, tirendus, Philipp Waldhauer, Madimetja Shika, Mihail Gutuleac, liuchenghui, AlexeyKosov, Anton and 5 more
Activity
philipzaengle commentedon Jul 7, 2015
+1 This would be really handy!
seank-com commentedon Jul 27, 2015
You can do this using the onMove event handler.
only problem is that there is nothing currently tracking the item you hovered over before hovering over this item, since the evt.from is the original list you are dragging from. I'm working on adding an evt.previous to do just this, but the dev branch has at least one issue that is slowing me down some. Note: The onMove handler is called on the sortable list the item is dragged from not the list/lists being hovered or dropped on.
emmettnicholas commentedon Jan 26, 2016
+1 This would be analogous to jQuery-UI-sortable's "over" and "out" events: http://api.jqueryui.com/sortable/#event-over
dzineduk commentedon Jul 1, 2016
+1 from me, this would be awesome, I'm dragging from one list to a sortable one and would like to be able to remove some classes from the dragged element when its hovering in the drop area!
Plugin is awesome by the way!
valentinvoilean commentedon Nov 9, 2016
I created a pull request for this: #991
Maybe it's not the best code, but at least it works ;) .
philippkuehn commentedon Jan 23, 2017
+1
is there any news on this?
owen-m1 commentedon Apr 8, 2019
Here is solution: #1468
waynevanson commentedon Jan 15, 2020
Closing because this has been answered.
lk77 commentedon May 20, 2021
Hello,
in my case i'm using vue draggable, so i can do :