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

129
Views
Changing css class with classList.add not working

I wanna add a class that makes a button looks disabled with calssList.add, I'm having hard time snice yesterday with this since i can't see any difference on the button, even if i see in the inspector that the button is having the css class that i wanna add, it doesn't make any changes.

###js

if (numberCheckboxChecked >= 3 && selectedLayout=='Layout1') {
  alert("You can't have more than two articles in this layout");
  saveButton.disabled = true;
  saveButton.classList.add("fl-button-disabled");

css

.fl-settings-save.fl-button.fl-button-large.fl-button-disabled{
  pointer-events: none;
  color: #666666;
  background-color: gray;
  border: 1px solid gray;
}
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!