$(window).load(function()) Is Error On Jquery 3.1.1 - Save My Knowledge
Monday, January 23, 2017

$(window).load(function()) Is Error On Jquery 3.1.1

I've been working on Jquery and it's time to upgrade my Jquery from 2.1.1 into 3.1.1. And while I upgrade my Jquery, I got error
Uncaught TypeError: a.indexOf is not a function

And then I got the answer, the .load is deprecated and we need to change it into
$(window).on("load", function() {}
After that, the error is gone.

Hope this help :)