Javascript equivalent of iOS's 'tap' event, but for android

﹥>﹥吖頭↗ 提交于 2019-12-05 18:21:44

Tap event working on my android 4.1 Samsung pocket phone

$(function() {
        $('#tapme').bind('tap', function() {
          $(this).parent().after('<li>tapped!</li>')
        });
  });

it works only when I include it inside

$(function() { 
   --- bind here -- 
});

and also for android, add this line

var jQT = new $.jQTouch({      
        useFastTouch: false
});

when u use jquery make sure these three are included (order matters!!)

<script src="jquery-1.7.min.js" type="text/javascript"></script>
<script src="jqt.min.js" type="text/javascript"></script>
<script src="jqtouch-jquery.min.js" type="text/javascript"></script>

with zepto

<script src="zepto.min.js" type="text/javascript" ></script>
<script src="jqt.min.js" type="text/javascript" ></script>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!