Event doesn't work
i have a div which has a child div. something like
the first div covers the second div fully,
so i want to create an event for the second div but because of the second i can't.
till now i have tried pointer-events and changing the z-index.
9 Replies
Not sure what you mean by creating an event. Can you provide a screenshot and/or describe your use-case and the desired outcome?
What's your current code look like? What have you tried? So far you've given us nothing to work with, sadly.
This is not my main project but it creates the same problem
to what element you added pointer-events?? it seems to work
https://codepen.io/MannixMD/pen/LYMYbax
Hi, not sure if you already solved this, but when you put pointer events none on an element, the children inherit it. So you will need to put pointer events: all in the item you want to interact
On the code pen you have
removing the
pointer-event: none
will make it work, it is preventing the entire element and its children from being clickable or interactive.From what I see in your
html
the .inner
element is not in the .outer
element.
It is just indented.