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

151
Views
Two blocks in getElementById

I am new to javascript. Let's say I have a block

<div class="nav">
  <div id="rectangle" class="rectangle">
    Content...
  </div>
</div>

And I am using this block in some script

document.getElementById('navShareLink');

But now I want to add another one to the nav block, let's say

<div class="nav">
  <div id="rectangle" class="rectangle">
    Content...
  </div>

  <div id="to-top" class="to-top">
    Content...
  </div>
</div>

The question is, can I use two blocks at once in this line, like

document.getElementById('rectangle', 'to-top');

If not, what are the options?

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!