In the code below, how would I target the a tag associated with the content (e.g. “Blah3”) using jQuery? I believe I need to use find? I looked through the jQuery doc but couldn’t find what I needed.
<div id="box">
<a href="test1.html">Blah1</a>
<a href="test2.html">Blah2</a>
<a href="test3.html">Blah3</a>
<a href="test4.html">Blah4</a>
</div>
You can use the
:contains()-selector like:See the jQuery docs for further information.