I know a similar question like this exists here:
CSS3 Element with Opacity:0 (invisible) responds to mouse events
but this question is different.
I'm trying to implement a hamburger navigation menu for mobile devices using jQuery, CSS as mentioned here: Demo.
This mostly works but there's a catch. In the above demo, they are hiding a navigation div which has been fixed to the top (top:0;left:0
) by setting opacity:0
. While in the above demo this works perfectly, when I implement it, the hidden div responds to clicks and navigates away from the page.
I'm not understanding how this has been disabled in the above demo (double checked the css / js files but no clue). Does anybody else have an idea? I can't really put up a fiddle since I'm trying this in SharePoint and in the fiddle it works. i just need to understand how they've disabled the click events even when using opacity:0
so I can replicate it. Thanks.