$drag
the method is called when a drag operation is initiated
function $drag( // a DOM element on which a dnd action has started source: HTMLElement, // a native HTML event ev: Event, // defines what pointer started dnd pointer: string): string
Returns
Section titled “Returns”string
a text which will be used in a dnd placeholder, returning false or an empty string will block dnd
Details
Section titled “Details”You can override it with your own logic, but check drag-n-drop related events first, as they provide a much more convenient way for drag-n-drop handling.
Pointer has two states: “mouse” and “touch”.
See also
Section titled “See also”Articles