开发者

make div follow finger on ios safari

开发者 https://www.devze.com 2023-02-23 02:13 出处:网络
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 smoot

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

精彩评论

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