Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var promoSlider = $('.promo-slider'),
- promoSliderCurrentIndex = $('.product-card__main-list-counter-current'),
- promoSliderAllIndex = $('.product-card__main-list-counter-all');
- promoSlider.owlCarousel({
- loop: false,
- items: 1,
- margin: 0,
- nav: true,
- dots: false,
- onInitialized: function(e) {
- promoSliderAllIndex.text(e.item.count / e.page.size);
- },
- smartSpeed: 1000
- });
- promoSlider.on('changed.owl.carousel', function(e) {
- promoSliderCurrentIndex.text(Math.ceil(e.relatedTarget.current() + 1));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement