using Jquery/javascript
Is it: $(document).focus()?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
.focus()method on a jQuery-wrapped element will bind to theonfocusevent if a function is passed as the first parameter, or trigger attached event handlers with no parameter.I’m not sure why you’re trying to do what you’re trying to do, but if you’re trying to blur the currently active element, no matter what element it is, you can use:
This isn’t advised though, as doing so will reset the tabbing order and potentially annoy keyboard-navigating users.