what does this $('#id', javascript_object); mean in jquery . I know that we can pass a context in the second parameter to the selector . But what happens when the second parameter is a javascript object .
Thanks in advance for the help .
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 second parameter is the selector context. It restricts searching to a specific document object or the children of a certain DOM element.
In the example you show, you would be searching for the element with the ID
idamong the children ofjavascript_object.