In jQuery there is a good plugin jQuery UI Draggable
, which allows you to create effects drag'n'drop. It works quite simply: it is necessary for any existing item to invoke the method .draggable():
If you try to call this method to dynamically added element, nothing happens:
$('body').append('New item'); $('#newblock').draggable();
New item will not be able to drag'n'drop. How to make here something like the analogue of the function .live () to dynamically created elements also react to these methods?