jQuery: How Do I simulate Drag and Drop in Code?

前端 未结 2 1604
失恋的感觉
失恋的感觉 2021-01-30 23:22

EDIT: Here\'s a link to show you my sample code: http://www.singingeels.com/jqtest/

I have a very simple page that references jquery-1.3.2.js, ui.core.js (latest version

2条回答
  •  误落风尘
    2021-01-31 00:05

    There's a question in the JQuery forum about it. It's not resolved at the time of writing, but may have more information in the future.


    EDIT: It was answered on the forum:

    I recommend you use the simulate plugin which is what jQuery UI uses for unit testing drag and drop:

    https://github.com/jquery/jquery-ui/blob/master/external/jquery-simulate/jquery.simulate.js

    You can see examples of use by looking at the unit tests

    https://github.com/jquery/jquery-ui/blob/master/tests/unit/draggable/core.js

    https://github.com/jquery/jquery-ui/blob/master/tests/unit/draggable/events.js

    Thanks to rdworth for that.

提交回复
热议问题