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

131
Views
Style is not changing according to class

I'm not sure why but for some reason the class is getting added but is not activating. What could be the reason?

let phone = document.querySelector("#phoneIcon")
phone.addEventListener("click", function() {
  phone.classList.add("phoneIconClick")
  phone.parentNode.removeChild(phone)
})
#aside {
  clear: both;
  float: right;
  margin: 5%;
}

#phoneIcon {
  font-size: 30px;
  border: solid;
  padding: 5px;
  border-radius: 50%;
  position: fixed;
}

.phoneIconClick {
  font-size: 15px;
  border: solid;
  padding: 10px 0px 10px 300px;
  border-radius: 10%;
}
<aside id="aside">
  <span id="phoneIcon"><i class="fas fa-phone"></i></span>
</aside>

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!