XF 2.3 How to configure carousel speed?

Kirby

Well-known member
Lightslider had an option to control the sliding speed, unless I am missing smth. it doesn't seem like this is still possible with Fancyapps Carousel?
 
Do you mean the interval between slides?
No, I was referring to the animation speed, eg. how long it takes for one animation to complete.
Configuring the interval / delay / pause between two animations was easy.

I've already tried Panzoom option friction / decelFriction but that doesn't seem to have any effect.
 
Last edited:
As it's not really documented anywhere (or I missed it) it took quite a bit of stepping into the JavaScript code, but I think I found what I was looking for:
CSS variable --f-transition-duration
 
As it's not really documented anywhere (or I missed it) it took quite a bit of stepping into the JavaScript code, but I think I found what I was looking for:
CSS variable --f-transition-duration
Hi, maybe it could be useful for you?

JavaScript:
<script>
let slideIndex = 0;
showSlides();
 
function showSlides() {
  let i;
  let slides = document.getElementsByClassName("mySlides");
  let dots = document.getElementsByClassName("dot");
  for (i = 0; i < slides.length; i++) {
    slides[i].style.display = "none"; 
  }
  slideIndex++;
  if (slideIndex > slides.length) {slideIndex = 1}   
  for (i = 0; i < dots.length; i++) {
    dots[i].className = dots[i].className.replace(" active", "");
  }
  slides[slideIndex-1].style.display = "block"; 
  dots[slideIndex-1].className += " active";
  setTimeout(showSlides, {{ property('setTimeout') }}); // Change image every 2 seconds
}
</script>
 
I am not entirely sure what your code is supposed to do, but Fancyapps Carousel has no elements with class dot (by default).

As I already posted, adjusting the interval / delay / bause between two slides is easy as it is documented (option Autoplay.timeout).
Changing the actual animation duration ("sliding speed") was not documented, but also isn't difficult - it just requires changing CSS varriable --f-transition-duration
 
I am not entirely sure what your code is supposed to do, but Fancyapps Carousel has no elements with class dot (by default).

As I already posted, adjusting the interval / delay / bause between two slides is easy as it is documented (option Autoplay.timeout).
Changing the actual animation duration ("sliding speed") was not documented, but also isn't difficult - it just requires changing CSS varriable --f-transition-duration

how do you actually do this?

i tried one simple test like:

Code:
[data-widget-key="xfmg_slider"] {
  --xfmg-slidesPerPage: 6;
  --f-transition-duration: 1000ms;
}

which doesnt error in the console, but also doesnt effect the speed.....with 2.3 it seems a bit jerky, we had a slow crawl on there somehow, id like to get that back.
 
its strange anyway because if you put --f-transition-duration in console, it prompts color options?
ive tried --f-carousel-transition-duration as well and found that root code it has other f-carousel codes but i cant seem to effect the speed 🤔
 
Back
Top Bottom