Suppose the jQuery object of the input is $input.
How to make its value selected(make it highlighted)?
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.
Let’s say the id of the element is
anInput, you should be able to do the following:$input represents the wrapped set or jQuery object, as you put it. The zeroeth index of this set is the first DOM element matched by your selector (there is only one in this case). With that element in hand, the select function should select its contents.
Is this what you need?