0

I am making a chess game in which I have to put a handler on Drag-Start event. I am currently using Redips Library for drag-drop but it doesn't seem to have a Drag-Start event dispatcher. I have also tried JQuery UI which support drag but I need specific drop positions (squares of chess) to imitate a move. I want to highlight the 'droppable' squares for a move through Drag-Start handler.

nefarianblack
  • 802
  • 8
  • 16

2 Answers2

1

The start event for JQuery's draggable UI is documented here.

$( ".selector" ).draggable({
  start: function( event, ui ) { 
      //code that is to be executed when drag starts 
    }
});
mridula
  • 3,203
  • 3
  • 32
  • 55
0

You can definitely do that with jQuery UI draggable.

Check out the snap functionality.

phonicx
  • 479
  • 2
  • 14