In terms of execution time and resources employed, is it more convenient to load as much stuff as possible with jQuery.ready() or the bare essentials?
In terms of execution time and resources employed, is it more convenient to load
Share
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.
just use it as trigger for you init functions… Don’t put all your code in it:
don’t do:
do:
its more readable, and it simply makes no sense to put all your code in the ready function.
ps:
$(function(){})===$(document).ready()