Our company sells Interactive LED panels and the menu on our website will not open the sub-menu items properly when using Touch input. The parent link is currently only a placeholder for the sub-menu items, this means that there is no href on the first Parent item on the menu, but this may change, then you will have to accommodate double tapping on the link to actually go to that link. The sub-menu items will currently only show on hover.
I have looked at most of the answers on stackoverflow and tried most of them, but it does not seem to work or some of the answers have deprecated code.
How to recognize touch events using jQuery in Safari for iPad? Is it possible?
Javascript, detect touch devices
https://codeburst.io/the-only-way-to-detect-touch-with-javascript-7791a3346685
https://knackforge.com/blog/karalmax/how-deal-hover-touch-screen-devices
How to check browser for touchstart support using JS/jQuery?
I created an If statement which will write to the console if it was a Touchstart or Click event. I used the JQuery on("click touchstart") section of code on one of the answers, but no luck. I noticed as I was testing on PC and on the 2 in 1 Touchscreen Windows tablet (Normal Mode) that the console detected it as a normal Click event when I tapped on the link. Touchstart never came up. I then proceeded to read up on Modernizr. Our site already have Modernizr running. I noticed that on the 2 in 1 Touchscreen tablet that the Class 'no-touch' is showing, so it is behaving as a normal PC with no Touch. I need to write code that will work in Tablet and Normal mode as well as getting this working on an Interactive Touch LED panel. Our website is www.parrot.co.za, you will notice on the menu that "Documents" is the main parent item with sub-menu items. I have included a screenshot of the HTML structure. What I would like to achieve is to get the Sub-menu showing when you tap on the menu linK.