简体   繁体   English

JavaScript (jQuery) 预加载器页面不工作

[英]JavaScript (jQuery) preloader page not working

I have this preloader code for my website.我的网站有这个预加载器代码。 It uses jQuery 1.8.3, which I know is quite old, but it's what worked for me.它使用 jQuery 1.8.3,我知道它已经很老了,但它对我有用。

The thing is that since I installed my SSL certificate on my website, the preloader doesn't go away.问题是因为我在我的网站上安装了我的 SSL 证书,所以预加载器不会消失。

This is the code:这是代码:

jQuery(document).ready(function ($) {
        $(window).load(function () {
            setTimeout(function(){
                $('#preloader').fadeOut(150, function () {
                });
            },1500);

        });
    });

It is made to have a wait, and then hide the preloader.让它等待,然后隐藏预加载器。

Thanks in advance!提前致谢!

this is OP with the fixed solution.这是带有固定解决方案的 OP。

Turns out it was and SSL problem, the certificate and firewall didn't allow for http imports, and I was importing jQuery with an http source.原来是 SSL 问题,证书和防火墙不允许 http 导入,我正在导入带有 http 源的 jQuery。 The solution was as simple as adding an s to the source link and I was done.解决方案就像在源链接中添加一个 s 一样简单,我就完成了。

http://code.jquery.com/jquery-1.8.3.min.js => https://code.jquery.com/jquery-1.8.3.min.js

Cheers!干杯!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM