SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var promoSlider = $('.promo-slider'),
  2.     promoSliderCurrentIndex = $('.product-card__main-list-counter-current'),
  3.     promoSliderAllIndex = $('.product-card__main-list-counter-all');
  4.  
  5. promoSlider.owlCarousel({
  6.   loop: false,
  7.   items: 1,
  8.   margin: 0,
  9.   nav: true,
  10.   dots: false,
  11.   onInitialized: function(e) {
  12.     promoSliderAllIndex.text(e.item.count / e.page.size);
  13.   },
  14.   smartSpeed: 1000
  15. });
  16.  
  17. promoSlider.on('changed.owl.carousel', function(e) {
  18.   promoSliderCurrentIndex.text(Math.ceil(e.relatedTarget.current() + 1));
  19. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top