javascript - jQuery - Call function when dropping div -


I want to leave the div # draggable to run the function 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 (); }    

The following code will work ...

  Function Init () {$ ('#memedragable'). Dragable (); $ ('Body') Droppable ({drop: function (Event, UI) {insertHouse ();}}); }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -