It may just my limited js experience but until recently I had some js attached to the drupal context on one of my sites to produce some small animation/style effects that took the form:
$(window).on("load",function() {
//do something
})
This worked great until recently then suddenly stopped working with no errors or messages. Eventually I got it working by changing the above to:
$(document).ready(function() {
//do something
})
Did something change in core or jquery that caused this? Why would there be no errors? I use the first $(window).on()
successfully on at least two other sites but have not been able to figure out why it stopped working on this one.
Some of the js I wish to run relies on the entire page being fully loaded so I really would rather use $(window).on()
- which I believe triggers later.
I am using the latest release version of drupal 8