From the course: Learning jQuery UI

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Using drag-and-drop interactions

Using drag-and-drop interactions - jQuery Tutorial

From the course: Learning jQuery UI

Start my 1-month free trial

Using drag-and-drop interactions

- The drag and drop interaction pattern has been around with us for a long time going all the way back to the original Macintosh and using jQuery UI you can easily add drag and drop functionality to your applications and I'll demonstrate how to do that in this movie. So here in the snippets I've scrolled down to the drag and drop section and let's open up DragDrop_start.html and let's build ourselves a drag and drop piece of functionality. So let's begin by seeing how to make an element draggable. What I'm gonna do first is bring this document up in the browser so you can see the content. So here I have a Div which I'm going to make draggable. So once we've learned how to makes items draggable we can see how the drop function works. So in the code let's go to the snippets and let's begin by simply copying this line of code over and pasting it into the Document Ready function. So when the document loads we're going to call the Draggable function on this Div, and you can see that this…

Contents