我正试图通过从库存和装甲中拖放武器来构建游戏 jquery drop事件可以正常工作
$('#gs_weapon,#gs_inv').droppable({
drop: function(ev,ui)
{
itemInSpot(ui.draggable,this,"weaponc.php","Damage : ","#gs_da");
}
});
但是当我添加头盔掉落事件时,它只停止为#gs_inv工作
$('#gs_helmet,#gs_inv').droppable({
drop: function(ev,ui)
{
itemInSpot(ui.draggable,this,"helmetc.php","Armor : ","#gs_ar");
}
});
droppable工作正常,但drop事件不是