I'm adapting the code from the Stellar HTML5UP template to my needs. At some point I decided to update jQuery from 1.11.7 to 3.1.0.
(function($) {
$(function() {
var $window = $(window),
$body = $('body'),
$main = $('#main');
// Disable animations/transitions until the page has loaded.
$body.addClass('is-loading');
$window.on('load', function() {
console.log("Page loaded");
window.setTimeout(function() {
$body.removeClass('is-loading');
}, 100);
});
// more code
});
})(jQuery);
When using jQuery 1.11 I can see "Page loaded" in my web console. After updating jQuery - the code block is not executed anymore.
Why?