Skip to content

Instantly share code, notes, and snippets.

@pusanukbr

pusanukbr/slick.js

Created Nov 29, 2017
Embed
What would you like to do?
Slick изменение по событию
// Slick================
// Иниализация слайдера
$('.siema').slick({
fade: true,
autoplay: true,
autoplaySpeed: 5000,
speed: 300
});
// Изменение ДО сменны слайда
$('.siema').on('beforeChange', function( event,slick, currentSlide, nextSlide){
if (currentSlide == 0) {
$(".main_header, .header_menu").css({ 'background-color': "#5CA5A5", "transition": "all .4s" });
}else{
$(".main_header, .header_menu").css({ 'background-color': "#F7B132", "transition": "all .4s" });
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.