below, it says $ sign refers to jQuery. i need help understand how?
jQuery(function($){
// Here `$` refers to jQuery
});
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.
When you pass a function to jQuery like this:
It’s the same as using jQuery’s “document ready” handler:
however the argument passed to that function is actually the global jQuery object itself – it’s just that most such handlers never use that parameter. Hence the real signature is this:
so, within that function
$is a local alias to the global jQuery object. The variable name could be anything you wanted, but$is a popular alias forjQuery, and the default global alias unless you calljQuery.noConflict().This is described in more detail in the paragraph “Aliasing the jQuery Namespace” at http://api.jquery.com/ready/