Strange issue with my website: the page loads normally when tested on local machine but after deployment the preloader (visible only on desktop) doesn't get dismissed.
The template that I'm editing uses jQuery 3.2.1
jQuery(window).load('body', function() {
setTimeout(function() {
jQuery('.mihi_tm_preloader').addClass('loaded');
}, 1000);
});
1. After checking out, on my local machine it throws those errors in console:
2. When deployed to server it gives those errors:
It looks like you're getting an error: "Uncaught TypeError: Cannot read property 'createDocumentFragment' of undefined" which is causing your jquery not to be executed.
Here's a link to help you figure out where your issue is or maybe post your jquery for more help.
Uncaught TypeError: Cannot read property 'createDocumentFragment' of undefined
Seems like the problem was with the jQuery(window).load('body', function()
so i removed it and added a simple delay function:
function dismiss_preloader(){
setTimeout(function() {
jQuery('.mihi_tm_preloader').addClass('loaded');
}, 1000);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.