Moodle carousel events - Moodle 3.8.1

Moodle carousel events - Moodle 3.8.1

by Gabriel Lacerda -
Number of replies: 0

Hello i'm trying to use the Bootstrap carousel event 'slide.bs.carousel' but it's not even entering in the function..

Here is the js code, i'm using the Boost theme:

$(document).ready(function() {

alert('anetes');

    $('.block_recommenda #myCarousel').on('slide.bs.carousel', function (event) {

    alert('s');

    var slideFrom = $(this).find('.active').index()+1;

    var slideTo = $(event.relatedTarget).index()+1;


    var secondString = Cookies.get('secondString');

    var thirdString = Cookies.get('thirdString');


    var tempString = slideTo+" "+secondString+" "+($('.carousel-item').length)+" "+thirdString;

    $("#course-count").html(tempString);

    });

});

Average of ratings: -