Jquery Image not visibly dragging after first drop -
i'm jquery neophyte i'm trying simulate lightbox
number of images may exist on page , have have "floating" dropzone user can drag , drop images drop zone added lightbox.
the lightbox consists of table 2 rows , 4 cells, there divs within each cell dropzones.
i going use table/cells adjust order of images (which saved (among other things) via ajax server.)
i have centered image via snap need position div
statically contained. perhaps there's solution in each case when omit adding position/static draggable not position within container div
s or table cells:
$(".dropboxes").droppable({ // recenter image once dropped drop: function (event, ui) { //need check if exists first more logic follow $(this).find("div").attr("class", "drag2").remove(); $(this).append(ui.draggable.css('position', 'static')) } });
the image dragged dropzone draggable new drop zone, image on second drag not show image or div
still drop correctly. if remove "$(this).append(ui.draggable.css('position', 'static'))
" second drag works correctly it's not contained within dropbox.
here's fiddle: fiddle
Comments
Post a Comment