I decided to set alias for $, because dollar sign is hardly accessible on keyboard:
$(function(){
var ff = $;
ff('p').hide();
});
Now I use ff instead of $ everywhere. Is it considered good or bad practice?
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.
The
$name is itself an alias, the jQuery function is really namedjQuery, so you can use that instead:The
readyevent handler also has a parameter that you can use instead of copying the global jQuery reference: