javascript event for a mobile pinch/zoom action

前端 未结 3 1675
-上瘾入骨i
-上瘾入骨i 2020-12-10 06:31

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 fi

相关标签:
3条回答
  • 2020-12-10 06:41

    hammer.js http://eightmedia.github.com/hammer.js/ is one of the best javascript library for such problems..

    0 讨论(0)
  • 2020-12-10 06:45

    Zepto is a jquery compatible library for mobile and provides handlers for pinch events. Unfortunately, they are listed as iOS only. (See "Touch Events")

    Synopsis:

    $('some selector').pinch(function(){ ... });
    $('some selector').pinchIn(function(){ ... });
    $('some selector').pinchOut(function(){ ... });
    
    0 讨论(0)
  • 2020-12-10 06:45

    Touchy is a jQuery plugin that provides support for pinch, drag, swipe, longpress, rotate. It works on any browser that implements touchstart, touchmove and touchend. Future versions will also support IE10.

    0 讨论(0)
提交回复
热议问题