javascript - Make a dynamically generated div droppable -


I am working on a table with div in the cell, and I think the div should be droppable and when I drop something in a div so it first creates a new div under. But the dynamically-generated device should have a droppable and it is not now ...

$ ("
", {id: "divCreate" + i, class: " Droppublic "}); $ (DivCreate) CSS ("text-align", "center"); $ (DivCreate) CSS ("width", "125px"); $ (DivCreate) CSS ("height", "30px"); $ (Cell) .append ($ (divCreate)); JS Droppable:
  $ (". Droppable"). Droppable (function () {// a lot of lines with many functions}}   

so I try to add that $ (divCreate) .droppable (); Now this display is a drop-job for the creation of the div, but it is not with the JS function which I influence the "draperprepellable" class.

Did I create $ (divCreate) Need "live" ("droppable"); ? Or is it impossible and I need to build a code from JS function to all the code? I really want to know if this is possible.

droppable In code named function:

  function my_droppable () {// many lines with many functions}   

and change its normal binding:

  $ (". Droppable"). Droppable (my_droppable);  .droppable (my_droppable);   

Dynamically after adding new elements.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -