slideGo нужно вынести за пределы $(document).ready(function() {
$(document).ready(function() {
let slider = $('.gallery__wrap');
slider.slick({
slidesToShow: 1,
slidesToScroll: 1,
dots: false,
centerMode: true,
centerPadding: '500px',
arrows: true,
appendArrows: $('.gallery__arrows'),
prevArrow: '<button class="gallery__arrow gallery__arrow--dir_left"></div>',
nextArrow: '<button class="gallery__arrow gallery__arrow--dir_right"></button>',
dots: true,
appendDots: $('.gallery__dots'),
customPaging : function(slider, i) {
return '0' + (i + 1);
},
dotsClass: 'gallery__dots-list',
responsive: [
{
breakpoint: 1430,
settings: {
centerPadding: '200px',
}
},
{
breakpoint: 960,
settings: {
centerPadding: '100px',
}
},
{
breakpoint: 780,
settings: {
centerPadding: '0px',
centerMode: false,
}
}
]
});
});
function slideGo(dir) {
let slider = $('.gallery__wrap');
if(dir === "+") {
slider.slick('slickNext');
} else if ( dir === "-" ) {
slider.slick('slickPrev');
}
}