javascript - Jquery Sortable and Draggable between parent and child frame -
i trying implement jquery draggable|droppable|sortable between parent , kid frame. have prototype there weird behavior happening
win = document.getelementbyid('frame').contentwindow; element = win.document.getelementbyid('sortable'); $(element).sortable(); console.log(element); $( "#draggable" ).draggable({ connecttosortable: $(element), iframefix: true, helper: function() {return $("<div/>").css('background-color','red');} });
the iframe page contains
$("#sortable").sortable();
here jsfiddle http://jsfiddle.net/vxazs/5/
it works fine when seek drop element on iframe when seek sort elements on iframe element sticks click event of both pages think (so doesn't dropped until click on both parent , iframes). think .sortable() phone call in both parent , iframe if remove droppable stops working.
ok, here how doing one.. create drag on element parent frame , drop in sortable list in iframe, created draggable on element of parent frame within iframe
win = document.getelementbyid('<identifier iframe>').contentwindow; win.jquery(dragelement,parent.document).draggable({ connecttosortable : $("#sortable") )}
works charm!
javascript jquery jquery-ui jquery-ui-sortable jquery-ui-draggable
No comments:
Post a Comment