onclick event is not working on ipad and tablet

后端 未结 3 395
甜味超标
甜味超标 2021-01-12 23:39

onClick event not working on tablet,ipad? it is perfectly working on Pc browser but not working for touch events , i tried .binding(),.on() and many thing but they are not

3条回答
  •  时光取名叫无心
    2021-01-12 23:55

    You must have to bind the 'click' or 'tap' event for associated HTML control. You can bind like this

    $('elementid').bind('click',function() {   alert('Click event triggered'); });
    

    OR

    $('elementid').bind('tap',function() {  alert('Tap event triggered'); });
    

提交回复
热议问题