Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
129
rated 0 times [  130] [ 1]  / answers: 1 / hits: 21112  / 13 Years ago, fri, february 24, 2012, 12:00:00

I searched a lot to find a tutorial for drag & drop with jQuery alone (without UI), but due to the popularity of JQuery UI, all drag and drop features are based on JQuery UI.



Can anyone give me a hint how to make a basic Drag & Drop by JQuery standalone?


More From » jquery

 Answers
89

I think a good starting place might be to map out the process, and then decide which jQuery tools you will need to use for each user action.



so the user process might be:




  • Click on your content div on a draggable area

  • Drag the content, which will keep the content inside that div

  • release the mouse, which will put the content into a droppable container, which will adjust the size of the previous content to fit the droppable size



which needs the following types of event listeners:




  • mouseup

  • mousedown

  • animate



At the very least. Another option might be to check out the jQuery UI source, and see how they do it! Which will tell you exactly what to do but you can add to it or trim where necessary.


[#87230] Thursday, February 23, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dannyc

Total Points: 517
Total Questions: 106
Total Answers: 116

Location: Netherlands
Member since Mon, Jun 7, 2021
3 Years ago
;