What is the difference between these two events: focus
and focusin
?
The focusin event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the focus event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).
http://api.jquery.com/focusin/
According to the jQuery focusin documentation:
The focusin event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the focus event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).
The focusin event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the focus event, in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling).
This event will likely be used together with the focusout
event.