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

180
Views
Barba.js triggering transition on anchor links

quite noob user of Barba.js here.

I am using Barba.js on a Joomla website, and almost everything is working fine.

My problem is that Barba.js is triggering the page transition also on my anchor links, and it redirects to the homepage.

<a href="#section3">Click here</a>

This is the element that I have on my mydomain.com/index.php/secondPage

When I click on the element, the site barba-transitions to mydomain.com/index.php#section3

But if I go to my secondPage and refresh the page, the anchor link works perfectly.

What am I missing?

Thank you very much.

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

0

If you don't want certain links to be processed by Barba.js you can add a class to them - so the Barba knows it's not Barba business. For example - add prevent-barba class and then in Barba init function parameters add:

prevent: ({ el }) => el.classList && el.classList.contains('prevent-barba'),

Hope that helps :)

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!