jquery ui get id of droppable element, when dropped an item

前端 未结 4 1864
刺人心
刺人心 2020-12-04 14:39

How we get the id of droppable element, when dropped an item? Here i use jquery ui and asp.net mvc.

 

        
      
      
      
4条回答
  •  独厮守ぢ
    2020-12-04 15:05

    You hookup a "drop" event and interrogate the element that you just dropped. The element being the parameter "ui" in the function below

    $( ".selector" ).droppable({
       drop: function(event, ui) { ... }
    });
    

    Have a look at the documentation.

提交回复
热议问题