$(window).load Is Deprecated
For years, I had been using jQuery’s nifty
$(window).load handler to do stuff once a page’s scripts, images, etc. finished loading. And then, one day, I went to copy/paste from the .load() documentation and saw a note that it had been deprecated. Oh no!
No need to panic. There’s an easy solution. Instead of this old code:
Use this instead:
It does the same exact thing, only it’ll still work once you upgrade to jQuery 3.
See jQuery’s .on() documentation for more info.