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

213
Views
In CSS , How can I filter span element depending on dynamic property?

I use span elements like button and I disable and enable it depending on bussnies condition using old JS code like this:

document.getElementById('lblChecks').disabled = false/true

in HTML

<span id="lblChecks" disabled="disabled" class="GridHeader" onclick="ChecksPoPuP();" style="display:inline-block;color:White;height:19px;width:132px;cursor: hand;">Cheques</span>

In CSS I use .GridHeader[disabled="disabled"] but it doesn't work on chrome, but it works fine on IE.

So how can I filter (.disabled) as dynamic property in CSS

Note: the problem can be solved easily using addClass and removeClass in JQuery but I have a lot of files and its hard to replace all of them

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can define a common class name for all the elements which is disabled/enabled back and forth, and use CSS to style it.

For example:

.att-disabled:disabled{ // style goes here }

Refer more: https://developer.mozilla.org/en-US/docs/Web/CSS/:disabled

about 4 years ago · Juan Pablo Isaza 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!