Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
jQuery nclick stop owl carousel in html not working

I have a few owl carousels on my website enter link description here, they contain youtube iframe, below is my code:

<div class="owl-carousel" data-margin="30" data-responsive-lg="5" data-responsive-md="4" data-responsive-sm="3" data-responsive-xs="1" data-nav="" data-loop="true" data-autoplay="true">

  <?php foreach($latestprojects as $lp){ ?>
  <div id="singam" class="vertical-item item-gallery content-absolute text-center ds">
    <article class="vertical-item post type-post status-publish format-video has-post-thumbnail content-padding border-rad-5">
      <div>
        <iframe src="https://www.youtube.com/embed/<?=$lp->url?>" allowfullscreen="true">
            </iframe>
      </div>
      <div class="item-meta flex-wrap d-flex ds" id="theng">
        <a href="blog-single-left.html" style="text-align:center" id="chakkap"><?=$lp->name?></a>

      </div>
    </article>

  </div>
  <?php }?>

</div>

i tried the below code to make the carousel stop on hover, however its not working:

$('.owl-carousel').on('click', function(event){
    var $this = $(this);
    if($this.hasClass('clicked')){
      owl.trigger('play.owl.autoplay');
    } else{
    owl.trigger('stop.owl.autoplay');
   }
 });

Can anyone please tell me how to fix it? Thanks in advance

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!