0

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.

The thing is that since I installed my SSL certificate on my website, the preloader doesn't go away.

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!

  • do you get anything in your console? also you don't necessarily have to put window.load inside document.ready – Sumit Wadhwa Sep 20 '20 at 09:29
  • I don't unfortunately. – Magnesium Films LTC Sep 20 '20 at 09:32
  • can you try running this in your console: `$('#preloader').fadeOut()` and see if it works. Also why would you want to have your client wait for additional 1500 secs after everything is loaded. You should remove the setTimeout – Sumit Wadhwa Sep 20 '20 at 09:37
  • See [How to render the html only after the whole content has been downloaded](https://stackoverflow.com/questions/62681479/how-to-render-the-html-only-after-the-whole-content-has-been-downloaded/62682677). It show how to correctly construct a preloader. – Carlo Corradini Sep 20 '20 at 10:19

1 Answers1

0

this is OP with the fixed solution.

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. The solution was as simple as adding an s to the source link and I was done.

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

Cheers!