First slide delay when fade set to true
- 主要言語
- JavaScript
- スター
- 11.9k
- フォーク
- 2.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When the `fade` setting is `true`, the current slide is only set after the time defined in `autoplaySpeed`.
Here is my configuration:
```
var settings = {
dots: false,
lazyLoad: true,
infinite: true,
autoplay: true,
fade: true,
speed: 1000,
autoplaySpeed: 4000,
arrows: false,
}
```
By inspecting the DOM, I can verify that no slider is set as `slick-current` until the time elapsed in the configuration. Since all sliders have `opacity:0` and no current is selected, the slider does not show any images when loaded.
As a quick hack to prevent an empty slider, I force the opacity of the first slide.
```
.slick-track {
.slick-slide:first-child {
opacity: 1 !important;
}
}
```
This is less than ideal since on load, the first slide displays for twice the time as other slides.
Thanks.
コントリビューションガイド
評価
この issue はまだ評価されていません。