开发者

make div follow finger on ios safari

how c开发者_如何转开发an I, using touchmove, make a div follow my finger?


This might be too heavy an approach, but you can use jQueryUI draggable, combined with this touch library. It works pretty smoothly on iPad, I assume it would work on iPhone as well.

With jQuery and those two libraries, you just call '.draggable' on the div you want to move.

$('#divToDrag').draggable();

There are a zillion options for jQueryUI draggable divs, but that gets you the basics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜