I’ve seen some code where they just do this:
$().ready(function()
{
...
});
This is shorter than doing a document selector but is it the same 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.
Slight change:
Is equal to:
As of jQuery 1.4:
$().ready(function() { });no longer works correctly in all cases. From the release notes: