I needed to adjust this script so that when I clicked on the previous button it would return the command, but when I click on both the next and the previous one, the slide is advancing in the same way, thank you in advance. >
CODE JS:
$(document).ready( function() {
$('#myCarousel').carousel({
interval: 4000
});
var clickEvent = false;
$('#myCarousel').on('click', '.nav a', function() {
clickEvent = true;
$('.nav li').removeClass('active');
$(this).parent().addClass('active');
}).on('slid.bs.carousel', function(e) {
if(!clickEvent) {
var count = $('.nav').children().length -1;
var current = $('.nav li.active');
current.removeClass('active').next().addClass('active');
var id = parseInt(current.data('slide-to'));
if(count == id) {
$('.nav li').first().addClass('active');
}
}
clickEvent = false;
});
});
Next, I'm going to tell you what's going on, this function coordinates for my slide to pass, and a background comes up in the options on my menu, it's as if the links follow the image
This is my slide:
ButwhenIclickonthecontrollertotheleft,theimagegoestotheleft,butthebackgroundinthelink,continuestogoforward,inthecasethere,itwasinAERIAL,Iclickedback,anditwenttoPHENOMENAL,thatis,itjustgoesforward,doesnotcomeback. This function is the core of my slide, but I need it when I click back it comes back and not forward, how do I do that? I'm kind of a layman with jquery ..