Search code examples
javascriptjqueryhtmlgifjquery-3

Jquery load anonymous?


Im a little bit confused now. Because I read all other answers but none is like my case.

I manage to always get working my preloading gif using simple jquery load function.

But now even though all my code is the same Im getting this error...

Like if load was not a funcion....

enter image description here

And my code:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
    <script src="assets/js/plugins/owl.carousel.js"></script>


    <script type="text/javascript">
        $(window).load(function() {
       $(".loader").fadeOut("slow");
        })
    </script>

</head>


<body id="body" data-spy="scroll" data-target=".one-page-header" class="demo-lightbox-gallery">

 <div class="loader"></div>

What can it be?


Solution

  • This might solve your problem:

    Don't use jQuery 3 yet -- go back to 1.11.3 or such. Especially when using a plugin like owl carousel.