2

jQuery v3.0 deprecates the .load() function which has me in a bind because my jQuery scripts require that images be loaded before they run. Does anyone know a way to apply what was previously coded as

$(window).ready(function() {

but without using the .load() lead in?

$(window).ready(function() definitely does NOT work, as it triggers before the images are loaded.

I am trying to find a solution which works well with a jQuery function. I am aware of Javascript .onload but am not sure how to mesh that as a lead in for jQuery routines.

Thank you!

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
Ira G
  • 111
  • 1
  • 8

1 Answers1

3

According to http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/:

Removed deprecated event aliases

.load, .unload, and .error, deprecated since jQuery 1.8, are no more. Use .on() to register listeners.

https://github.com/jquery/jquery/issues/2286

j08691
  • 197,815
  • 30
  • 248
  • 265