How-To JQuery

Drag and Drop in JQuery

Drag and Drop
Drag and Drop

Here is a simple way, to do Drag and Drop in Jquery. In this article, we are explaining Jquery Drag and Drop in a very simple and clear steps with the developed code example. It can be downloadable by clicking here.

This uses Jquery UI, with the help of this, the elements can be dragged and dropped to the respective place. Using this UI, we can make Documnet Object Model DOM elemnets to drag anywhere within their view port. These can be draggable object or HTML element by mouse and dragging it anywhere within the Dropable Area.

jQuery UI is a combination of multiple methods and a set of Graphical user interface effects, widgets, interactions, and themes that can be provided on any of the web apps using jQuery methods and funtions. If you want to build a powerful web app that includes various set of  features such as dragging and dropping the elements, Jquery UI date picker, Jquery Tooltips, etc. then jQuery UI is a perfect choice to build up these effects as well as Graphical User Interfaces.

The Draggable() Method
This method allows the HTML elements to be dragged with the help of mouse. Using jQuery User Interface, we can make the DOM(Document Object Model) HTML elements to drag it anywhere within the Draggable area. This can be done by clicking on the draggable HTML object through mouse and dragging it anywhere within the Draggable area.

The Droppable() Method:
This method allows the HTML elements to be dropped with the help of mouse. Using jQuery User Interface, we can make the DOM(Document Object Model) HTML elements to droped anywhere within the Draggable area on the specified targeted DIV. This can be done by clicking on the draggable HTML object by mouse and drop it on the specified targeted area.

Here is the Live Example :

Dragger 01
Drop Area

Happy Coding 🙂

About the author

Vishwas

A coder who is trying to solve some problems via "Procoders", Software Engineer By Profession, WEB Enthusiast, Hobby Blogger. I love to share Tech Ideas and like to learn and explore new things and Technologies.

Add Comment

Click here to post a comment