php – Change the Nav-prev color on the last slide in the Slick slider-ThrowExceptions

Exception or error:

I’m sorry to use the translator.
I hope the last slide changes the color of the nav-prev.
I made the code like this.
I didn’t know, so I just put the numbers in.
Page 3 may not be the last page, so how should I edit it?
Please answer what to put instead of 3.

jQuery('#slider').on('afterChange', function (event, slick, currentSlide) {
  if(currentSlide ===  3) {  //last slide
    jQuery('nav-next').css('color', 'rgba(4, 59, 114, 0.2)');
  }
  else {
    jQuery('.nav-next').css('color', '#043b72');
  }

  if(currentSlide === 0) { // first slide
    jQuery('.nav-prev').css('color', 'rgba(4, 59, 114, 0.2)');
  }
  else {
    jQuery(.nav-prev').css('color', '#043b72');
  }  
})
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *