<div class="children"> Sachin </div>
<div class="children"> Moron</div>
<div class="children"> Peter </div>
is it possible to apply color to div with specfic content like below
If div content is sachin then i need to disabled it, other wise it will enable
.children sachin {
cursor: not-allowed;
opacity: 0.5;
}
2
Answers
You can do it if you are able to use data attributes.
You can add a
disabled
class to the divs you want to disable.Using the
disabled
html attibute is also possible: