$('.slider-nav')
.slick({
slidesToShow: 5,
slidesToScroll: 1,
dots: true,
centerMode: true,
focusOnSelect: true,
variableWidth: true,
})
.on('click', '.slick-slide', function() {
$('.slider-for').slick('slickGoTo', this.dataset.index);
})
.find('.item-nav')
.attr('data-index', i => i);