My site Traken.net has a simple preloader image that is removed when the page is fully loaded.
This works fine until I enable the Rocket Loader. When I do, the code that removes the preloader never runs:
$(window).on("load", function () {
console.log("removing loader");
$('.preloader').fadeOut(500, function () { $('.preloader').remove(); });
});
<script data-cfasync="false" type="text/javascript" src="js/main.js"></script>
I added the data-cfasync to the script, but it still does not run.
Is there a way to resolve this?