Did jQuery add any sort of new functionality to internal JS object like the “anchor” object?
I know you can select via $("a"), but what happens if i already have an object selected?
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.
Edit: I missed the first half with this answer.
For the first question: No, jQuery doesn’t do this, it adds functionality to jQuery objects which is different. Prototype takes this route, extending DOM elements/properties (though last I heard, they’re reversing this in Prototype 2.0).
For the second: If you have a jQuery object pointing to the anchor just call any method on it, like this:
If it’s a DOM element you have, just wrap it using
$():