What is the non-jQuery equivalent of $(document).ready()?
What is the non-jQuery equivalent of $(document).ready() ?
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.
The nice thing about
$(document).ready()is that it fires beforewindow.onload. The load function waits until everything is loaded, including external assets and images.$(document).ready, however, fires when the DOM tree is complete and can be manipulated. If you want to acheive DOM ready, without jQuery, you might check into this library. Someone extracted just thereadypart from jQuery. Its nice and small and you might find it useful:domready at Google Code