Can anyone tell me the difference between blur and focusout, focus and focusin with a simple example?
blur
focusout
focus
focusin
The focus and blur events keep track of the elements the user focuses on.
Fires when a focusable element gains the focus
Fires when a focusable element loses the focus
focusin and focusout
Fire at the same time as focus and blur, but bubble.
for example check this