drag

Fired while dragging. The drag event represents a jQuery mousemove event and contains all the event data of the jQuery Event Object.

Example - bind during the initialization

<div id="draggable"></div>

<script>
  $("#draggable").kendoDraggable({
    hint: function(element) {
      return element.clone();
    },
    drag: function(e) {
      console.log("x: ", e.screenX, "y: ", e.screenY);
    }
  });
</script>
<style>
  #draggable {
    width: 50px;
    height: 50px;
    background-color: orange;
    border: 2px solid green;
  }
</style>

Example - hook up to the event via bind method after initialization

<div id="draggable"></div>

<script>
  $("#draggable").kendoDraggable({
    hint: function(element) {
      return element.clone();
    }
  });

  $("#draggable").data("kendoDraggable").bind("drag", function(e) {
    console.log("x: ", e.screenX, "y: ", e.screenY);
  });
</script>
<style>
  #draggable {
    width: 50px;
    height: 50px;
    background-color: orange;
    border: 2px solid green;
  }
</style>

Event Data

e.target Element

The draggable element.

e.sender kendo.ui.Draggable

The Draggable instance which fired the event.

In this article
Not finding the help you need? Improve this article