To avoid this delay, you could manually launch both carousels at the same time, and use customized treatments for events.
- Syncronized init
- Simple launch events on both carousels
- Pause on hover (I missed you didn't need it)
$('.carousel-sync').carousel('cycle');
$('.carousel-sync').on('click', '.carousel-control[data-slide]', function (ev) {
ev.preventDefault();
$('.carousel-sync').carousel($(this).data('slide'));
});
$('.carousel-sync').on('mouseover', function(ev) {
ev.preventDefault();
$('.carousel-sync').carousel('pause');
});
$('.carousel-sync').on('mouseleave', function(ev) {
ev.preventDefault();
$('.carousel-sync').carousel('cycle');
});
0 comments:
Post a Comment