I need someone to review a bug on my code pen

I have this codepen: https://codepen.io/peles_cezar/pen/dJBdYp?editors=1111

If someone can help me to see why the jquery “click” event is no working and is firing on document load.


The reason tempToogler fires on document load is because in the following line of code you are executing tempToogler instead of just referencing the function.

Instead of:


it should be:


The reason the click event does not work is because you are using pointer-events: none; in your “glass” class. This prevents the user from clicking on elements within this div and the div’s children elements. Was there a reason you put this line into your solution?