onBeforeDrag

fires before drag-n-drop has started

boolean onBeforeDrag(object context,Event object ev){ ... };

Parameters

contextobjectdrag-n-drop context object
evEvent objecta native event object

Returns

booleanreturning false will prevent dragging of the element

Example

$$("fmanager").attachEvent("onBeforeDrag",function(context,ev){
    // your code
    return true;
});

Related samples

Details

The properties of the context object are:

  • from - (object) the source object
  • to - (object) the target object
  • source - (array) the ID of the dragged item(s)
  • target - (string) the ID of the drop target, null for drop on empty space
  • start - (string) the ID from which DnD started
Back to top