javascript - Draggable Element Disappears After Dialog -
i'm trying use draggable/sortable effect add new element list , open dialog window asking name it. happens though after dialog closes newly created element disappears.
$(function() { $( "#sortable" ).sortable({ revert: true }); $( "#draggable" ).draggable({ connecttosortable: "#sortable", helper: "clone", revert: "invalid", stop: function(event, ui) { $("#dialog").dialog('open'); } }); $( "ul, li" ).disableselection(); }); $(function() { $("#dialog").dialog({ autoopen: false, height: 150, width: 200, modal: true }); }); function changetitle() { var boxtext = $("#newstitle").val(); $(".ui-draggable").text(boxtext); $(".ui-state-default").removeclass('ui-draggable'); }
i think i've narrowed down having when dialog returns. ideas?
Comments
Post a Comment