Skip to content
Advertisement

Is there any way to make double-click events work in phones with vanilla JavaScript?

I realized my double click events don’t work when I toggle the device toolbar. I googled but I’ve seen only jQuery stuff and I have no idea about jQuery. How do I make this work?

JavaScript

I am trying to open a modal with this event. it perfectly works on pc, doesn’t work on mobile.

Advertisement

Answer

unfortunately you can’t listen for double tap event but you can measure the time difference between two single taps using touchstart event.

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement