用于移动捏/缩放操作的 javascript 事件 [英] javascript event for a mobile pinch/zoom action
问题描述
我需要一些帮助.我正在尝试处理移动网页.当用户执行放大/缩小操作时,我想做的是捕获".也就是说,当他们将两根手指放在屏幕上并分开或合拢手指时.我看了一下jquery mobile,没看到.
I need some help. I am trying to work on a mobile web page. What i'm trying to do is "capture" when the user does a zoom in/zoom out action. That is, when they put two fingers on screen and separate or close their fingers together. I looked at jquery mobile and didn't see it.
那么具体来说,我可以将 javascript 函数附加到移动设备中的捏/缩放事件吗?
So specifically can I attach a javascript function to a pinch/zoom event in a mobile device?
任何帮助将不胜感激.
推荐答案
hammer.js http://88media.github.com/hammer.js/ 是解决此类问题的最佳 javascript 库之一..
hammer.js http://eightmedia.github.com/hammer.js/ is one of the best javascript library for such problems..
这篇关于用于移动捏/缩放操作的 javascript 事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!