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

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