$ in jQuery
What does $ sign denote in jQuery?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted Jun 4, 2014, 6:57 AM EDT
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
Abhay ShankerRank #375 · 6.7K reputationPosted Jun 4, 2014, 9:23 AM EDT
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:jQuery('#Text').click(function () { jQuery('#Text').css('color', 'red'); }); For more detail check below urls http://www.tutorialspoint.com/jquery/jquery-selectors.htmSharad RathoreRank #3,483 · 416 reputationPosted Jun 29, 2014, 9:26 AM EDT
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;