How can I recognize touch events using jQuery in Safari for iPad? Is it possible?

前端 未结 8 2054
抹茶落季
抹茶落季 2020-11-22 13:09

Is it possible to recognize touch events on the iPad\'s Safari browser using jQuery?

I used mouseOver and mouseOut events in a web application. Are there any simila

8条回答
  •  星月不相逢
    2020-11-22 13:31

    If you're using jQuery 1.7+ it's even simpler than all these other answers.

    $('#whatever').on({ 'touchstart' : function(){ /* do something... */ } });
    

提交回复
热议问题