Click event called twice on touchend in iPad

后端 未结 3 1577
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 00:44

I am using jquery animate for the slide. I have an arrow at the end of the slide and given the click event on that arrow. The working of it is to move one item inside the si

3条回答
  •  盖世英雄少女心
    2020-11-30 01:25

    Be careful with using a UA sniffer for iPad/iPod. You're ditching all Android devices with a solution like that! A better solution is to detect the touch support, it will work on all Mobile/Tablet devices:

    var isTouchSupported = "ontouchend" in document;
    

提交回复
热议问题