$ in jQuery
What does $ sign denote in jQuery?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sharad RathorePosted Jun 29, 2014, 1:26 PM
The dollar sign
It's a variable called $ that's been assigned a function called jQuery, as can been seen in the unminified version of the jQuery file:
window.jQuery = window.$ = jQuery;
Abhay ShankerPosted Jun 4, 2014, 1:23 PM
The
$is just a function. It is actually an alias for the function calledjQuery, so your code can be written like this with the exact same results:Abhishek KumarPosted Jun 4, 2014, 10:57 AM
Dollar Sign is nothing but it's a notation for JQuery.
When a variable is defined it will assign a copy of the jQuery function. This function will be used heavily as overloaded function with different parameters.
Example:
$(document).ready(function(){
});
$ sign can be replaced with "jQuery " keyword
jQuery(document).ready(function(){
});
Hope this will help