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?