Skip to main content

Drupal 8.4 requires jQuery 3, which no longer supports load()

You might get this error

Uncaught TypeError: a.indexOf is not a function
at r.fn.init.r.fn.load (jquery.min.js?v=3.2.1:4)
at Object.attach (scripts.js?v=8.4.0:1)
at Object.Drupal.attachBehaviors (drupal.js?v=8.4.0:25)
at drupal.init.js?v=8.4.0:16
at HTMLDocument.t (ready.min.js?v=1.0.8:4)



Drupal 8.4  is using latest jQuery version 3.2 which does not support load() function.

Instead of using load(), you can use .on(load,function(){}) 

$(window).on('load', function () {
});

Comments