How can i override css property with javascript/jQuery, like cssHooks(jQuery), but prop was in external css.
e.g.
index.html
<div id="test">abc</div>
styles.css
#test {background: red;}
and every time I use background prop I want to hide this elem and do nothing with background.
“but I want to do it not only for certain div (#test) but for every element with background prop in my css”
if you’re using jquery, you can just do
That will hide the element and leave the background untouched.
[Edit] I don’t think I understood the question before. Per your comment, what you want to do is change things that are using the
backgroundproperty? I don’t believe there is a way to do this. The only option I can think of is to loop through every single DOM element and check if if has a element.style.background set.