For instance, within a div of the same class, there are 6 "p" tags - some containing 'member' text and others not. I aim to use jQuery to select all "p" tags with 'member' as their inner text and apply an additional class to them.
Here is the code on which I intend to take action:
<div>
<p class="customClass">Member</p>
<p class="customClass">Non-Member</p>
<p class="customClass">Member</p>
<p class="customClass">Non-Member</p>
<p class="customClass">Member</p>
</div>
This is the expected outcome:
<div>
<p class="customClass member">Member</p>
<p class="customClass">Non-Member</p>
<p class="customClass member">Member</p>
<p class="customClass">Non-Member</p>
<p class="customClass member">Member</p>
</div>