javascript - drop and resize doesn't seem to works after a first resizing, with jQuery -
good morning dev ': -)
If I first press the mouse after recycling, then I Now change the size ... and, after changing the size first, I can not even leave that div ...
I use Laravel and jQuery.
See
I should be able to resize again ...
Here the JS code (JSField will show you the whole code):
$ ("#creneau" + i + "-" + j). DropperBill ({appendTo: "body", Tolerance: "Pointer", Accept: ".external-event", drop: Function (Event, UI) {var draggableEvent = null; $ (drg) .removeClass ("Clonable") ($ (ui.draggable) .hasClass ("clonal")) {var drg = ui.draggable.clone (); $ (drg) .addClass ("playable"); $ (drgable)); Drg.resizable (Handle: 'E, W', resize: function (event, UI) {$ (this) .empty (); $ (this) .append ($ (this) .position (). Left) ; $ (This) .append ("& lt; div style = \" z-index: 90; display: block; \ "class = \" ui-resizable-handle ui-resizable-e \ "& gt; & lt ; / Div & gt; "); $ (this) .append (" & lt; div style = \ "z-index: 90; display: block; \" class = \ "ui-resizable-handle ui-resizable- W \ "& gt; & lt; / div & gt;");}}); Drg.draggable ({appendTo: "# hour-creneau", cursor: "move", helper: 'clone', back: "invalid"}); DraggableEvent = $ (ui.draggable); } And if ($ (ui.draggable) .hasClass ("Runable")) {$ (this) .append ($ (ui.draggable)); DraggableEvent = $ (ui.draggable); } $ (This) .append (drg); }}); and html:
& lt; Div id = 'external-events' & gt; & Lt; h4 & gt; Draggable Status & lt; / H4 & gt; & Lt; span class = 'external event clonal' & gt; State 1 & lt; / Span & gt; & Lt; span class = 'external event clonal' & gt; State 2 & lt; / Span & gt; & Lt; span class = 'external event clonal' & gt; State 3 & lt; / Span & gt; & Lt; Span class = 'external-event clonal' & gt; State 4 & lt; / Span & gt; & Lt; / Div & gt; & Lt; Div id = "table-event" & gt; & Lt; div id = "hour-connective" & gt; & Lt; div id = "hours" & gt; & Lt; / Div & gt; & Lt; div id = "cineauau" class = "dragable" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Thanks a lot!
edit: liability I can not post an answer yet, but I edit this message:
$ (this) .css ("top", ""); $ (This). CSS ("left", ""); And after resizing the drop works.
And to disable size after the first resize, it was because I used to attach the text to the div ... why not really know, but this resizable event 'broken'.
Thanks guys for trying to help me.
I answered, I answer.
First of all, the div seems to be adding "top, left and full CSS" when resizing occurs. So I removed the left and above:
$ (this) .css ("top", ""); $ (This). CSS ("left", ""); And after resizing the drop works.
And to disable size after the first resize, it was because I used to attach the text to the div ... why not really know, but this resizable event 'broken'.
Thanks guys for trying to help me.
Comments
Post a Comment