Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda