Hello I have something like
div.find("input").autocomplete({
…..
and am wondering if I can add an input id to the element…
ie.
div.find("input#good")
thanks!
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.
An input tag can have an id on it like:
<input id="good" type="text">. If you did that, then you can just use this jQuery$("#good")to find it and that should be simpler thandiv.find("input#good")and faster because finding an id is natively supported by the browser.There can only be one object in a page with the id=”good”, so there’s no reason to use div.find on it unless you only want it found if it’s in a more narrow context.