Created
October 27, 2023 04:03
-
-
Save SitesByYogi/7aa06f3fd115fd33e749cba3350c3253 to your computer and use it in GitHub Desktop.
remove class with js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeCSSVariableAndChangeColor() { | |
const selector = ".woocommerce div.product p.price"; | |
const elements = document.querySelectorAll(selector); | |
elements.forEach(element => { | |
// Remove the CSS variable | |
element.style.removeProperty('--color-1'); | |
// Change the color to #b3af54; | |
element.style.color = '#b3af54'; | |
}); | |
} | |
// Call the function to apply the changes | |
removeCSSVariableAndChangeColor(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment