Html – if $(window).load() is deprecated, what should I use

htmljqueryload

I need a function that is called when the page is totally loaded (text, image, and so on).

I noticed that $(window).load() is now deprecated. So, what should I use?

Best Solution

If you want just avoid the load function, use the generic on function :

$(window).on('load', function(){
  // insert code here
});
Related Question