Jquery UI Draggable Absolute Instead of Relative?

前端 未结 4 1925
半阙折子戏
半阙折子戏 2021-02-18 20:18

I have a div containing a few jquery draggables, however if at any point I remove one of these draggables from the page then this can move the rest of them as they are positione

4条回答
  •  悲哀的现实
    2021-02-18 20:58

    You can set the position to be absolute by using the jQuery css function when setting an element to be draggable.

    $(this).draggable().css("position", "absolute");
    

提交回复
热议问题