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

111
Views
How to use anchor tag to click on particular span

all sorry for the very basic or maybe a silly question but I was trying to do something which I am not sure, can be done by using an anchor tag or not. After searching over the internet I didn't find any perfect solution for that so here I am writing this question.

Problem - I want to redirect my page from index.php to about.php, and I also want to open one div that can be only visible if we click on it. How to do that using an anchor tag?

I tried - <a href="about#my_div_id"> unfortunately, It didn't work I think maybe because I have to also click on that particular div to make it open. Anyone can please help me out I need some solution to do this. I am using angularJs so if it can be done by that, please help!

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Could you parse the URL in JavaScript on page load, open the div, and set document.documentElement.scrollTop to the position of the div on your page?

Something like:

# On page load:
#   if $parsedURL has $hash:
#     div.show()
#     window.scrollTo(div.position)
about 4 years ago · Santiago Gelvez 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!