I am attempting to add click events to a few div elements. One of them has borders but no height or width. It seems like the clicks are not consistently registering, possibly due to browser issues. Even using the CSS rule .class:hover{}
does not seem to solve the problem.
$("body").on("click", "._tlh_dropdown, ._tlh_dropdown *", function (event) {
The click event does not seem to work properly when clicking on a div inside ._tlh_dropdown
. Additionally, clicking on the div ._tlh_dropdown_close_button
does not remove its parent div as expected, nor does it change color when hovered over. What could be causing this issue? I suspect it has to do with the click event not being applied to the padding areas of the divs. How can I resolve this problem?