0
votes

I use bxslider, but when I enter the site it keeps loading and the console tells me:

TypeError: undefined is not an object (evaluating 'a.indexOf')

If i refresh it works fine.

I tried it with and without document ready, in the header and in the footer. But nothing seems to work.

$( window ).ready(function() {
    $('.bxslider').bxSlider({
      minSlides: 2,
      maxSlides: 4,
      slideWidth: 320,
      slideMargin: 0
    });
});
element with this 'bxslider' class exist in your dom? - danish farhaj
instead of $( window ).ready, use either $( window ).load, or $( document ).ready. - Gogol BH Network