B
B
Bobull2017-04-08 23:40:35
Owl Carousel
Bobull, 2017-04-08 23:40:35

Changing Owl Carousel scroll buttons from scroll state?

Good time of the day!
Faced such a problem.
It is necessary to make the color of the scroll button change depending on the state of the scroll.
For example, if we are on the initial scroll: the left button is a gray arrow, the active right arrow and the color is black. If we are at the end of the scroll - the right arrow is gray, and the active left (black color).
Thank you!
scroll.jpg

var owl=$(".product-slider");
 owl.owlCarousel({
 	items : 4,
 	nav: true,
 	navText: ["<span class=\"icon-angle-left\"></span>","<span class=\"icon-angle-right\"></span>"]
 });
  $(".product-next").click(function(){
  	owl.trigger('next.owl.carousel');
  })
  $(".product-prev").click(function(){
  	owl.trigger('prev.owl.carousel');
  })

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question