I\'ve used onclick
events in my website. But when I open it in google chromes\' developer mode\'s mobile view, nothing happens on touch on the elements which wo
onclick may not work on touch devices, I had this issue and the event ontouchstart sorts it. if you use ontouchstart and onclick watch that you don't trigger the event twice.
this is another post related onClick not working on mobile (touch)
onclick
works fine on touchscreens; I've used it several times and have never had any problem.
You could consider using onmousedown
instead of onclick
. Or use jQuery to detect taps.