A.J. Côté wrote:showed me that you can now replace onload= with:
Not exactly. That's a jQuery ready handler and it is not a direct replacement for the load event, but rather an event that is fired when the DOM has finished being built and is ready to be manipulated.
And it is, of course, only available if jQuery is loaded onto the page. It cannot be used without jQuery.