Answer the question
In order to leave comments, you need to log in
What is the problem with slick slider?
I have a layout with
tabs when switching to other tabs, the slick slider does not work.
function mainTabs() {
$('.main-tabs').on('click', 'li:not(.active)', function () {
$(this)
.addClass('active').siblings().removeClass('active')
.closest('#discounts').find('.one-tab').removeClass('active').eq($(this).index()).addClass('active');
});
$('.main-tabs').on('click', 'li:not(.active)', function () {
$(this)
.addClass('active').siblings().removeClass('active')
.closest('#discounts').find('.slider').slick('setPosition');
});
}
Answer the question
In order to leave comments, you need to log in
I think I need to reinit the slick when switching tabs. It's trying to refer to a block on the first slide that already has display: none.
There was a problem with displaying slick in tabs, I solved it https://github.com/kenwheeler/slick/issues/187#iss...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question