jQuery UI: Drop into relatively positioned container

前端 未结 2 1477
野趣味
野趣味 2021-01-25 07:30

I am using jQuery UI to drag a clone of an object onto a droppable space. However, I need the droppable space to have the position: relative property because the dr

2条回答
  •  忘了有多久
    2021-01-25 08:05

    Here is a solution but I'm not sure, if it is that, what you're looking for.

    Replace this line:

    $(this).append($(ui.helper).clone());
    

    with this one:

    $('
    ').appendTo(this);

    If you don't use the ui.helper it works.

提交回复
热议问题