Last active
January 5, 2024 06:35
-
-
Save MarkKevin08/8d5415629764616c9128d2cf1e287729 to your computer and use it in GitHub Desktop.
If -0%, then hide this div - Frequently Bought Together
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
const divs = document.getElementsByClassName('product-bundle__discount-label'); | |
for (let x = 0; x < divs.length; x++) { | |
const div = divs[x]; | |
const content = div.textContent.trim(); | |
if (content == '0%' || content == '-0%') { | |
div.style.display = 'none'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment