Possible Duplicate:
What is the $ in jQuery?
We know that $ is an alias of jQuery, while using jQuery javascript framework.
But internally what $ is ?
I mean whether it is an object, function or other thing?
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.
$ is a function object in jQuery. It can take a number of different types of parameters or methods. That’s why you will see things like:
In that use, it’s just a function – identical to:
In this example, it returns an object that contains both the collection of DOM items matching the passed in CSS string and has a whole bunch of methods that let you operate on that collection of items it returned such as:
to get the innerHTML of that DOM object.
It is usually used like a function
$(params), but can also has methods as an object$.get().But, most of all
$is just a symbol for a function object that also has methods. It could be calledfooor anything else so it’s not anything unusual in Javascript.