javascript - jQuery - Call function when dropping div -
I want to leave the div # draggable to run the function The following code will work ... insertHouse () Can not manage to work You are trying to call me in the second line below. What am i doing
& lt; Img src = "picture / door 1.jpg" id = "draggable" & gt; & Lt; Div id = "item" & gt; & Lt; / Div & gt; // Place House; Enter functionHouse () {Bleblabla} $ (init); Function init () {$ ('# makeMeDraggable'). Draggable (); $ ('Body') Droppable ({drop: handleDropEvent}); } Function handle DoPevent (Event, UI) {function insertHouse (); }
Function Init () {$ ('#memedragable'). Dragable (); $ ('Body') Droppable ({drop: function (Event, UI) {insertHouse ();}}); }
Comments
Post a Comment