How do I trigger the Drop event with jQuery UI Droppable without actually dragging and dropping?

前端 未结 3 1808
礼貌的吻别
礼貌的吻别 2020-12-10 03:26

I have a droppable with a drop event handler:

$(this).droppable({
  drop:function(){
    console.log(\'OMG You Dropped It!\');
  }
});
         


        
3条回答
  •  粉色の甜心
    2020-12-10 04:10

    You should move the code in your drop handler to a separate function.
    You can then call the function both in the handler and elsewhere.

提交回复
热议问题