+1 vote
by
Have slick.js very strange behavior. When opening popup'and the normal view:
Normal

This will the first time you open popup'and. If you open the other, the following situation:
The problem

That is, not loaded image, but there are arrows to the slider. If on them to click a photo of gradually revealed:
The gradual unfolding of

I guess the problem is in initialization. Someone faced with such, how can I solve the problem?
by
ProjectSoft Yes , but there is a "nuance" - write in the comments to the answer, now I try to solve it.
by
Mark , iBird Rose you gave the right decision. It was his call when opening a popup
by
When initialize slick, when you close it, destroy it.
To know how slick you are using....
For example kenwheeler.github.io/slick
Unslick is a method which will break the slider
$('.slider').slick('unslick');
by
YoloV , website: http://татуед.рф/
ProjectSoft , 1.8.0.

As I understood, the initialization goes js/main.js 60 to 66 place.

P. S. the Project gave an old client, he was doing the layout of a partner who now on vacation abroad, I have a different direction, so you have their knowledge to leave (even intermediate artist, as the curve did, which is 14 similar forms) and terrorize toaster questions, so I apologize if the solution is obvious.
by
Chrome dev tools, it is possible to ask for a reference on the website?

1 Answer

+3 votes
by
Repeated calls to the call method setPosition
$('.slider').slick('setPosition');
by
Thanks, it helped, but with the caveat that the 2nd call to the image is the "normal" position. I made screenshots of gradation(run via the console):
Work - 1st run $('.slider').slick('setPosition'); 2nd run $('.slider').slick('setPosition');
by
Mark try one of two things
// Инициализация всех слайдеров
$('.slider').slick({
dots: false,
infinite: false,
speed: 300,
slidesToShow: 1,
adaptiveHeight: true
});
$('.serviceItem__button, .serviceItem__more').magnificPopup({
type:'inline',
midClick: true,
callbacks: {
open: function(){
// вызыв метода пересчёта
$('.slider').slick('setPosition');
// Если не поможет первое
/*
setTimeout(function(){
$('.slider').slick('setPosition');
}, 50);
*/
}
}
});
by
$('.slider').slick('setPosition', 0);
or
$('.slider').slick('resize');
...