Blogs

Blogs

Easy and robust Drag & Drop with jQuery UI

I just came across a blog post with an example on how to create a drag & drop effect using jQuery UI.

Looking at the code it surprises how easy it is. The whole JavaScript is around 17 lines of code, but but only around 9-10 of them are directly related to the drag functionality.

But after hearing Paul talk about all the casuistics he was considering when implementing this functionality I would say that the most important characteristic is not simplicity but robustness.

Ever build a drag & drop effect but fails when the user moves the mouse out of the browser window? what happens if the mouse button is released in another app? etc, etc. That's the real hard part of drag & drop and is great to see Paul and the jQuery UI guys pay so much attention to these details.

I like this function in liferay,It made my work so convenience..
..
Hi Jorge,
I am trying to Integrate jQuery UI whit liferay in a portlet (Drag and Drop funcionality), but jQuery UI is not compatible with Liferay's jQuery version (1.1.4) emoticon
Hi Jonathan,

You are right. That's because we use Interface which depends on that older version of jQuery. We are working on substituting it with jQuery UI.
maybe next time lock and unlock draggable can be added
hi do you know how to create drag & drop effect in strut portlet?
Hi Gunjan,

I would look at the jQuery UI samples and documentation. Also you can use the forums to ask questions.
Hi Jorge ,
How can we control drag and drop. I mean to say I want to stop drag and drop. How can I achieve this.