- we have a div that has background:transparent, along with border. Under this div, we have more elements.
- Currently, we able to click the underlying elements when we click outside of the overlay div. then
- It was unable to click the underlying elements when we directly click on overlay div
- .we need to click through this div tag Then only we can able to click on the underlying elements.
- Using pointer-events: none along with CSS conditional statement for IE11.
- Using AlphaImageLoader, you can even set transparent .PNG/.GIFs in the overlay div and clicks through a DIV elements below.
- CSS:
- IE11 conditional:
- Here we can use elementFromPoint method.
- Attach a click to the div you want to be clicked through
- Hide it
- Determine what element the pointer is on
- Fire the click on the element there.
- This works on IE8/9, Safari Chrome and Firefox.
- Hide overlaying the element
- Determine cursor coordinates
- Get element on those coordinates
- Trigger click on element
- Show overlaying element again
- Using jQuery-click through a div to underlying elements:
- Absolute positioning for underlying elements:
- By adding pointer-events: none; to the absolute block.
- Using Tags to click through a div to underlying elements:
- Using array to underlying elements
- Using array
- pseudo html code to click through a div
- jQuery code:
- Using a combination of the applying a :hover selector on parent div and the pointer-events: none directive on the child div.
- HTML:
- CSS:
