Im trying to make a div run a function when a div is clicked on by doing:-
<div class="menuItem" onClick="return runNavigate();">Item 1</div>
However when I try an run it in my code, it doesnt run the code:-
What should happen is when the user clicks 'Main 1' the menu will appear which works, then the user clicks 'Tickets' which also works, but then when the user clicks on 'Item 1' it should run the function runNavigate which should (at the moment) just say 'Hi' which doesnt work.
No errors are displayed, just the click event is ignored. I have tried several options to try and disable child clicks following thought thinking that could cause the issue but still not found a solution.
Does anyone have any ideas what Im doing wrong here?