I am trying to use ajax to create a loading screen, while the JavaScript loads, however the ajaxStart() function doesn't seem to be working. Here is the code that I am currently trying to get working.
$(document).ajaxStart(function() {
console.log("started");
});