I used onclick events on my website. But when I open it in the google chromes browser mode mobile view, nothing happens when touching elements that work with a mouse click. So my question is:
onclick
Do I need to add ontouch events along with onclick events or work in onClick when touching all touch screen devices?
ontouch
PS: Here you can see all my codes: https://github.com/SycoScientistRecords/sycoscientistrecords.imtqy.com/
Or on the website: http://sycoscientistrecords.imtqy.com
And no, I have not tested the site on a real phone.
onclick works great on touch screens; I have used it several times and have never experienced any problems.
You can use onmousedown instead of onclick . Or use jQuery to detect taps.
onmousedown