jQuery draggable leaving cloned html behind
Posted
by Alex Crooks
on Stack Overflow
See other posts from Stack Overflow
or by Alex Crooks
Published on 2010-06-07T03:35:21Z
Indexed on
2010/06/07
3:42 UTC
Read the original article
Hit count: 285
I am using jQuery UI; Draggable http://jqueryui.com/demos/draggable invoked like this:
$(document).ready(function(){
$("#side_bar").sortable({
revert: true
});
$(".draggable").draggable({
containment: 'parent',
hascroll: true,
handle: 'div.box_header',
scrollSensitivity: 100,
scrollSpeed: 100,
axis: 'y',
connectToSortable: '#side_bar',
helper: 'clone',
opacity: 0.35
}); });
You can see the html structure on http://www.sarsclan.co.uk (right side bar area).
It seems to create a transparant clone as your dragging, but when you drop it puts the draggable div in the right place, but leaves the original div in it's place and just appends the dom with a clone of that original div in its new place.
© Stack Overflow or respective owner