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

223
Views
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
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!