jQuery .on() and .delegate() doesn't work on iPad

后端 未结 7 777
北荒
北荒 2020-12-05 04:38

If you try this snippet on desktop, everything works.
Whenever you try it on iPad, it won\'t do anything.

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-05 05:04

    I had an issue with a message that I prepend to the html body. I found this issue on [jQuery 'click' event doesn't work on iOS Safari?

    I used this

    $('body').on('click touchstart', 'someselect', function(){})
    

    And it worked on iPhone 4S and iPhone 5S

提交回复
热议问题