Reply To: Display one row in Services Widget

Premium WordPress Themes Forums Courtyard Display one row in Services Widget Reply To: Display one row in Services Widget

#3924
Elaina
Participant

Hi Rabindra,

I have made some changes to the custom.js file, but I can’t see any changes. Have I done something wrong? This is what the code currently looks like:

// Service Slider
jQuery(‘.pt-service-section’).each(function(index, element){
var container = jQuery(this).find(‘.pt-services-slider’);
var slideCount = jQuery(this).find(‘.swiper-slide’).length;
var nextButton = jQuery(this).find(‘.pt-more-arrow .pt-arrow-right’);
var prevButton = jQuery(this).find(‘.pt-more-arrow .pt-arrow-left’);

if ( slideCount < 3 ) {
var courtyard_services_slider_per_col = 1;
}
if ( slideCount >= 3 ) {
var courtyard_services_slider_per_col = 1;
}
if ( courtyard_window_width <= 580 ) {
var courtyard_services_slider_per_col = 1;
}

var pt_services_slider = new Swiper(container, {
nextButton: nextButton,
prevButton: prevButton,
spaceBetween: 0,
preventClicks: false,
slidesPerView: courtyard_services_slider_num,
slidesPerColumn: courtyard_services_slider_per_col,
touchEventsTarget: ‘swiper-wrapper’,
speed: 800
});
});