Jquery click not working with ipad

后端 未结 11 897
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 12:38

we have a web application which is using Jquery blockUI to open a pop up and do some action. All of this works fine on Safari, and IE 8. problem is with Ipad. none of the ac

11条回答
  •  萌比男神i
    2020-12-02 13:04

    Thanks to the previous commenters I found all the following worked for me:

    Either adding an onclick stub to the element

    onclick="void(0);" 
    

    or user a cursor pointer style

    style="cursor:pointer;"
    

    or as in my existing code my jquery code needed tap added

    $(document).on('click tap','.ciAddLike',function(event)
    {
        alert('like added!'); // stopped working in ios safari until tap added
    });
    

    I am adding a cross-reference back to the Apple Docs for those interested. See Apple Docs:Making Events Clickable

    (I'm not sure exactly when my hybrid app stopped processing clicks but I seem to remember they worked iOS 7 and earlier.)

提交回复
热议问题