Is it possible to detect when the user unfocuses an input box using jquery? I.e when they click off of it an event fires.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
The blur event will fire any time an element loses focus.
If you are trying to determine when any input element on the page loses focus, then use input as your selector.
If you are only trying to determine when a particular input element on the page loses focus, then using the element's id is the most efficient jQuery selector.
I believe the
blur
function is what you are looking for.