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

163
Views
JavaScript not firing in addon sidebar?

If I open my sidebar html file the javascript is working as intended, it is a simple toggle that adds/removes a class to show what is the currently selected panel:

function showPanel(panel){
  disablePanels();
  document.getElementById(panel).classList.remove('inactive'); 
}

function disablePanels(){
  document.getElementById("user").classList.add('inactive'); 
  document.getElementById("settings").classList.add('inactive'); 
  document.getElementById("about").classList.add('inactive'); 
}

In my sidebar html file I have these links to trigger:

<a href="#" onclick="showPanel('about');"><i class="fas fa-solid fa-comment"></i></a>

This is working perfectly while I open the html file and click the icons, however when I click them from my addon sidebar/popup it is not working as expected.

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!