I have this selector in my CSS file. I want to remove it from CSS file with JS. I have the exact DOM element which is Equal to the CSS selector .debtor-content label[for=amount]
.
I am making an app with JS.
//CSS
.debtor-content label[for=amount]::after
{
content: 'Insufficient Money';
font-size: 10px;
font-weight: bold;
color: red;
margin-left: 6px;
background-color: yellow;
padding: 1px 2px;
position: absolute;
top: 46px;
right: 58px;
}
2
Answers
I didn't find a solution as I wanted, something like this:
but instead i found this:
js:
thanks all for helping me.
I am also not sure about the motivation and whether this is the right solution of your problem, but if you really need to alter the style with JavaScript, you can sift through all rules of all
styleSheets
and then "put the display to none" for some: