Jquery bxslider exception

Well, that’s why the problem is mostly unknown to me, it’s never been before. I tried adding bxslider today, but it seems that it is not working properly. I tried using a different version of JS that he provided, but the same thing happens, the images continue to “load”, and they never load. I checked the item and this is what I got

jQuery.Deferred exception: Cannot read the 'indexOf' property undefinedTypeError: Cannot read the 'indexOf' property from undefined in jQuery.fn.load (file: /// C: / Users / Oploditelj / Desktop / domaci_last / js / jquery- 3.0.0.js: 9612: 12) in HTMLImageElement. (File: /// C: /Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js: 10: 4394) on Function.each (file: /// C: / Users / Oploditelj / Desktop / domaci_last / js / jquery-3.0.0.js: 359: 19) in jQuery.each (file: /// C: /Users/Oploditelj/Desktop/domaci_last/js/jquery-3.0.0.js: 152 : 17) in the HTMLImageElement. (File: /// C: /Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js: 10: 4355) on Function.each (file: /// C: / Users / Oploditelj / Desktop / domaci_last / js / jquery-3.0.0.js: 359: 19) in jQuery.each (file: /// C: /Users/Oploditelj/Desktop/domaci_last/js/jquery-3.0.0.js: 152: 17) in g (file: /// C: /Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js: 10: 4295) in c (file: // /C:/Users/Oploditelj/Desktop/domaci_last/js/plugin/jquery.bxslider.min.js: 10: 4180) in d (file: /// C: / Users / Oploditelj / Desktop / domaci_last / js / plugin /jquery.bxslider.min.js: 10: 2570) undefined

The code that Im uses is exactly the same as the one that was on their website.

<head> 
        <script type="text/javascript" src="js/jquery-3.0.0.js"></script>

        <script src="js/plugin/jquery.bxslider.min.js"></script>
        <link rel="stylesheet" type="text/css" href="js/plugin/jquery.bxslider.css"/>

        <script type="text/javascript" src="js/skripta.js"></script>


    </head> <!-- Head ends -->

and of course I call it in a separate .js file

$(document).ready(function() {

    $('.bxslider').bxSlider();

});

and body

<body> <!-- Body start -->
        <ul class="bxslider">
          <li><img src="js/plugin/images/pic1.jpg"/></li>
          <li><img src="js/plugin/images/pic2.jpg"/></li>
          <li><img src="js/plugin/images/pic3.jpg"/></li>
        </ul>

    </body><!-- Body ends -->
+3
source share
2 answers

Question about jQuery version 3.0 and compatibility with bxslider.js. And this question arose because of the jQuery function .load(). You must change bxslider.jsone line to solve this problem. Open the bxslider.js file and find the line of function code .load(). It was used only 1 time per bxslider.js, therefore it is necessary to change:

WITH

$(this).load();

For

$(this).trigger('load');
+20
source

Github has a migration request that solves this:

https://github.com/stevenwanderski/bxslider-4/pull/1024

I would recommend you test it.

+1

Source: https://habr.com/ru/post/1651010/


All Articles