Click through div to underlying elements

Yes, you CAN do this. Using pointer-events: none along with CSS conditional statements for IE11 (does not work in IE10 or below), you can get a cross browser compatible solution for this problem. Using AlphaImageLoader, you can even put transparent .PNG/.GIFs in the overlay div and have clicks flow through to elements underneath. CSS: IE11 … Read more

How to pass $(this) properly in click jQuery function

You code does not follow the right principles. Wrap everything in the document.ready function. Avoid global variables wherever possible. Make use of the fact that jQuery manages this for you. this will always be what you expect if you pass callback functions directly instead of calling them yourself.

Why is this jQuery click function not working?

You are supposed to add the javascript code in a $(document).ready(function() {}); block. i.e. As jQuery documentation states: “A page can’t be manipulated safely until the document is “ready.” jQuery detects this state of readiness for you. Code included inside $( document ).ready() will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute”

$(document).on(“click”… not working?

You are using the correct syntax for binding to the document to listen for a click event for an element with id=”test-element”. It’s probably not working due to one of: Not using recent version of jQuery Not wrapping your code inside of DOM ready or you are doing something which causes the event not to … Read more