Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

236
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda