I want check the checkbox, without trigger the alert.
<div onclick="alert('test')">
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
<input type="checkbox">
</div>
I have tried pointer-events: none and z-index: 1000
I want check the checkbox, without trigger the alert.
<div onclick="alert('test')">
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
<input type="checkbox">
</div>
I have tried pointer-events: none and z-index: 1000
2
Answers
Try this;
It is generally not a good idea to use inline event handlers.
Use event delegation instead. Something like: