Custom Javascript Not Working one mobile

My Custom Javascript Not Working one mobile
On our services page, the buttons don’t trigger the javascript

Hello PrimalCreate,

Thanks for writing in!

I have checked your site assigned to your license and I can tell that you are using the addEventListener() function. Please be advised that ‘click’ events is only present in desktop screens. With mobile and touch devices, you only have tap, double tap and pinch. Please have your code updated and add the touch events.

For example:

/* Toggles UX/UI Design Section */
document.getElementById("uxui-design_button").addEventListener("click touchstart", displayUxUiDesign);

We would loved to know if this has work for you. Thank you.

Thank you, I had to add a separate event for each, but it worked with this code

document.getElementById(“uxui-design_button”).addEventListener(“click”, displayUxUiDesign);
document.getElementById(“uxui-design_button”).addEventListener(“touchstart”, displayUxUiDesign);

Thanks for getting me on the right track

Glad you sorted things out,

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.