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

224
Vistas
Prevent anchor link(with YouTube urls) from a post that is loaded on the frontend open on a new tab

I am working on an application that displays video posts that are being loaded on the page as these are stored to a Mongodb database. The thing that trouble me is that anytime I click on a post that opens on a new tab which I don't want. Can someone assist please?

Any time a user click on the post these opens on a new tab. I need those to open on the same page.

let videoposts = await getVideoPosts();
let videoarticles = document.querySelector('.videopost');

videoarticles.innerHTML = '';
videoposts.forEach((videopost) => {
    let videopostHTML = `
        <div class="col-md-4 text-center animate-box">
            <div class="post-entry">
                <div class="post" style="background-image: url(images/unsplash.jpg);">
                  <div class="play">
                  <a class="popup-vimeo" data-href="${videopost.videoURL}"><i class="icon-play3"></i></a>
                 </div>
                </div>
                <h3>"${videopost.title}"</h3>
                <span>By the other ${videopost.speaker}</span>
            </div>
        </div>
    `;

    videoarticles.insertAdjacentHTML('beforeend', videopostHTML);
});
about 4 years ago · Juan Pablo Isaza
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