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

252
Views
Play Video by trigger('play') for 1
 $('a.thumbnail').click(function(){ 
  $(this).('.cu_vd').trigger('play');
}); 

 $('a.thumbnail').click(function(){ 
      $(this).('.cu_vd').trigger('play');
    }); 

I am trying to play the video by trigger but the video boxes are multiple with the same class. So I am trying to use 'this' so that It does not trigger to all, but it's not working This is the HTML page, where I am trying to play the video

https://dev-visualshowcase.cvent.com/bkeventvideos.html click on the IOV 1 (First box) the pop-up triggers and I want to play this video with JS function, instead of autoplay, because autoplay is not supporting in IOS https://dev-visualshowcase.cvent.com/eventvideos.html - here you can check the problem

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the data-attribute to target a specific video

<button class="thumbnail" data-target="video_1">Play the video</button>

<video id="video_1" playsinline="" preload="auto" muted="" controls="" loop="">
  <source src="https://dev-visualshowcase.cvent.com/VS/video/vd_intro/01.mp4" type="video/mp4">
</video>

Each time you click on the .thumbnail button, you use the data-target to choose your video

 $('.thumbnail').click(function(){ 
   let target = $(this).attr('data-target')
   $('#' + target).trigger('play');
 });  
about 4 years ago · Juan Pablo Isaza Report
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!