I have some html like this:
<html>
<body>
<div>
<p>Something</p>
</div>
<div class="hide" id="show">Protected</div>
</body>
</html>
I need to display or hide/show an element via JavaScipt if html has "Something" in its text. How can I do that? I need this for my Wordpress page.
div? Also, please ensure to do some research into how to select an element, how to search it's inner html or text and how to show hide it using JavaScript. Then post the code you have issues with so we can help. - How do I ask a good question - How to create a Minimal, Complete, and Verifiable example - How much research effort is expected of Stack Overflow users before posting a Question?