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

139
Visualizações
Javascript - scroll to specific anchor tag on another page

I am working on a project where had links to other pages for example

<a href="/services#FB-Lead-Generation">

so when I click on the link from say homepage - it loads the page services, but it doesn't go the anchor #FB-Lead-Generation I believe that it is not doing a full page re-load and hence the anchor tag is not working as when I access the link directly it goes to the anchor tag correctly. how I can achieve this, that is when I click from homepage or other page, it goes to the specific id/anchor position.

Target html

<div id="FB-Lead-Generation" class="capability" data-capability="0">
        <div class="capability__content">
          <h2 data-reveal="up" class="reveal--up revealed">FB Lead Generation</h2>
          <p data-reveal="up" class="reveal--up revealed">With a keen understanding of what's happening in the digital landscape, we leverage the power of google and social media we connect your targeted audiences with your product &amp; services.</p>
          
      </div> </div>

update for javascript:

e.default = function(t) {
        var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]
          , i = {
            url: window.location.pathname + window.location.search,
            method: "GET",
            data: null,
            headers: {}
        }
          , n = r({}, i, t)
          , s = new XMLHttpRequest;
        return s.onreadystatechange = function() {
            4 === s.readyState && (s.status,
            e(s))
        }
        ,
        s.open(n.method, n.url, !0),
        Object.keys(n.headers).forEach((function(t) {
            s.setRequestHeader(t, n.headers[t])
        }
        )),
        s.send(n.data),
        s
    }
about 4 years ago · Juan Pablo Isaza
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