0
I have a Carousel that is created dynamically with data coming from the database. But when creating dynamically it seems that it does not activate Next. How can I fix this? Follow the codes:
JQUERY:
$('.jcarousel-imagem-produto')
.jcarousel({
vertical: true
});
$('.jcarousel-control-prev-imagem-produto')
.on('jcarouselcontrol:active', function() {
$(this).removeClass('inactive');
})
.on('jcarouselcontrol:inactive', function() {
$(this).addClass('inactive');
})
.jcarouselControl({
target: '-=1'
});
$('.jcarousel-control-next-imagem-produto')
.on('jcarouselcontrol:active', function() {
$(this).removeClass('inactive');
})
.on('jcarouselcontrol:inactive', function() {
$(this).addClass('inactive');
})
.jcarouselControl({
target: '+=1'
});
You can create the control of forward and back in hand.
– PauloHDSousa
Is there any example of how I could do that? But up there it no longer creates control? The problem that I referred to is that it works if I put the LI without being created dynamically. If I create them dynamically it simply doesn’t trigger or understand the L'is
– Felipe Michael da Fonseca