1

I know that $(document).ready provides a very efficient method to execute code after DOM is loaded and ready. In Js I used <body onload=""> to accomplish the same result.

Anyone could explain me which are the advantages of using $(document).ready instead of a simple onload on body element?

Mohammad
  • 21,175
  • 15
  • 55
  • 84

0 Answers0