2008-05-18

jQuery: Drag & Drop and Resize in an event delegation fashion

I don't see any drag & drop jQuery plugin that works in a event delegation way so I put some code together and it works pretty well. Event delegation is good for 2 things:

  1. Perfomance : Drag & Drop web app are to often too slow. Event delegation could help.
  2. Simplicity : It's painful to handle events for each elements you have and add during the life of the page.

If you plan to build a complex online webapp, you should take a look on event delegation technics. Hope it will help someone.

Example : Drag & Drop and Resize example.

Download the plug in.

Credits

Inspired by EasyDrag jQuery plug in.