开发者

Remove unique object on touchend event in multi-touch web application

Been pulling my hair out and googling non-stop but can't find a solution. With the touchstart and touchmove events, I can retrieve a unique id from touches.identifier. This is not possible as touches does not work with touchend event.

  1. I want to create a div and assign the same id as the touches.identifer when开发者_开发技巧 touchstart happens.

  2. Update x y strings in the div during the touchmove event.

  3. Delete the div using jquery remove() on touchend event.

Step 3 is where I'm hitting a wall, i was going to use $("#"+e.touches.identifier).remove();

any suggestions to achieve step 3?

thanks a lot for any help!


Is there more than one such div present at any time? If you assign the div a class like "touch" on touchstart then you could select $("div.touch") on touchend. I'm just starting to get into touch-events myself though, so I'm not sure.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜