JQuery-UI draggable reset to original position

后端 未结 6 1917
自闭症患者
自闭症患者 2020-12-18 22:28

This is probably very easy to do, but I always think too complicated.

I\'ve just set up a simple test with #draggable / #droppable with a fixed width/height + float:

6条回答
  •  悲哀的现实
    2020-12-18 23:03

    I used this on a project

    $("#reset").click(function () {
        $(".draggable-item").animate({
            top: "0px",
            left: "0px"
        });
    });
    

    did the trick for me

提交回复
热议问题