In javascript the following works to give focus to the edit_2 input box:
document.getElementById("edit_2").focus();
However using Jquery this does not:
$("#edit_2").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.
You are calling a method, so:
should be
EDIT: If you are wondering why the first line was not counted as a syntax error, it’s because it is a correct statement saying “get the function
focus” (and do nothing with it).