Using jQuery UI draggable plugin , you can cause certain element draggable by mouse.
The element which are going to drag obtain a 'ui-draggable' class. This
element obtain a 'ui-draggable-dragging' class while
dragging.
Also, if you want to drag and drop this element, you need to incorporate jQuery UI Droppable plugin, which provides a drop target for draggables.
All callbacks (start, stop, drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
EXAMPLE :
<!DOCTYPE html> |
Output :
You can drag the box :

Learn from experts! Attend jQuery Training classes.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: jQuery UI Interaction : Draggable
Post your Comment