Let's imagine I start with this:
<title>Banana</title>
and also have some navigation set up like this:
<ul id="navigation">
<li>
<a href=#">Banana</a>
</li>
</ul>
Upon loading the site, the title of the page is saved as a variable. I then want to match this variable to any text within #navigation, which in this case is Banana. Once the text is found, a class is assigned like so:
<ul id="navigation">
<li class="chosen">
<a href="#">Banana</a>
</li>
</ul>
Can anyone provide examples or references for me to follow?