How to auto apply drag and drop effect to dynamically added element?

前端 未结 3 777
Happy的楠姐
Happy的楠姐 2021-01-27 16:51

I use jquery ui to apply a drag and drop effect on a serial of DIVs, for example:

...
.
3条回答
  •  长发绾君心
    2021-01-27 17:45

    You might also like to take a loot at the delegate() method introduced with jQuery 1.4 which is slightly better than live()

    Here is an article comparing both approaches - http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-the-difference-between-live-and-delegate/

提交回复
热议问题