0

I have something like this in my jquery scripts:

$( document ).on( "click", ".button", function() {

it appears to work fine in all touch devices too, I haven't notice any issue in my test. Do I really need to add touchstart? Like this:

$( document ).on( "click touchstart", ".button", function() {

Or it is irrelevant nowadays?

RGS
  • 4,062
  • 4
  • 31
  • 67
  • So I use touchstart just to click on iphone working faster? – RGS Sep 20 '18 at 10:21
  • 1
    It depends on how you want your UI to work. If you want the user to have to press and release, use `click`. If you want to perform the action as soon as the touch is made, use `touchstart` – Rory McCrossan Sep 20 '18 at 10:21
  • 1
    @RoryMcCrossan thank you very much friend – RGS Sep 20 '18 at 10:22

0 Answers0