W
W
William Miller2021-07-15 14:16:54
JavaScript
William Miller, 2021-07-15 14:16:54

Stopping a slow owl-carousel?

It was necessary to make a carousel with logos that moves slowly without stopping, I was able to do this, but after that there was a problem when hovering, the carousel stops only after 8 seconds, I understand why this happens because one slide moves 8 seconds and it takes 8 seconds to respond, please help as much as possible to implement such a thing is a slow slide, but when hovering to stop, it doesn’t work at all, even tried to stop processing the js code, it didn’t help,

<section class="media-mentions__main">
        <div class="media-mentions__cont owl-carousel">
            <a href="https://www.newsweek.com/bitcoins-price-lowest-since-january-us-top-destination-global-money-1603176" class="media__item" id="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/newsweek-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/newsweek-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://www.theguardian.com/business/live/2021/may/19/uk-inflation-rises-april-energy-fuel-clothing-bitcoin-ftse-stock-markets-business-live?page=with:block-60a50bb48f081260045210aa" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/theguardian-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/theguardian-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://www.cnbc.com/2021/05/19/bitcoin-btc-price-plunges-but-bottom-could-be-near-.html" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/cnbc-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/cnbc-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://uk.finance.yahoo.com/news/market-wrap-bitcoin-under-pressure-202724263.html" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/yahoo-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/yahoo-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://www.reuters.com/technology/bitcoin-struggles-footing-worries-over-china-leverage-2021-05-20/" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/reuters-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/reuters-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://www.bloombergquint.com/crypto/bitcoin-erases-all-gains-since-elon-musk-s-initial-big-embrace" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/bloomberg-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/bloomberg-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://www.financemagnates.com/cryptocurrency/trading/crypto-derivatives-demand-in-2021-industry-insiders-predict/" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/magnates-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/magnates-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://borsen.dk/nyheder/investor/tunge-investorer-stovsuger-markedet-for-bitcoin" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/borsen-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/borsen-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://www.coindesk.com/market-wrap-bitcoin-pressure-improving-sentiment" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/coindesk-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/coindesk-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://forbes.com.br/forbes-money/2021/05/bitcoin-recua-519-e-caminha-para-forte-queda-mensal/" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/forbes-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/forbes-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
            <a href="https://www.moneymarketing.co.uk/news/crypto-trading-platform-launches-for-institutional-investors/" class="media__item">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/money-white.png" alt="Media Logo" class="media__item_img media__item_img_hover">
                <img src="<?php echo get_template_directory_uri(); ?>/img/mentions/money-hover.png" alt="Media Logo" class="media__item_img media__item_img_hovered">
            </a>
        </div>
  </section>


( function( $ ) {


    $(".media-mentions__cont").owlCarousel({
        items: 4,
        loop: true,
        center: false,
        margin: 10,
        autoWidth: false,
        autoplay: true,
        autoplayHoverPause: true,
        rewind: true,
        slideTransition: 'linear',
        autoplaySpeed: 8000,
        smartSpeed: 8000,
        responsive: {
            1200:{
                items: 5
            }
        }
    });
} )( jQuery );


Link to the video how the carousel reacts to hover
https://youtu.be/6Txm5iz2iEE

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