This won't work in the case where the target element is a child element of the toggle element. The toggle element could be a container that contains children. The event target might be a child element.