hi, im looking to use javascript for highlighting other links that use the same anchor text so when a user "hovers" over one of them the others are highlighted. (the reason i have multiple links that point to the same animal is because they are from a tag cloud that shows animals which have recently had their info in a database changed thus the same animal can appear more than once.)
e.g.
<a href="search.php?animal=1" id="link1">animal1</a>
<a href="search.php?animal=2" id="link2">animal2</a>
<a href="search.php?animal=1" id="link3">animal1</a>
<a href="search.php?animal=3" id="link4">animal3</a>
Hovering over link1 would also highlight link3 and vice versa. Don't hesistate to ask questions about my scenario if i havent explained well enough. Ive been scratching my head on this for the past 4hrs - Ive tried putting <span></span> with document.getElementById("link3").style.backgroundColor("red"); around the anchor tag for link1 in hope that hovering over link1 would highlight link3 but to no avail. Any help would be much appreciated. Thanks.
e.g.
<a href="search.php?animal=1" id="link1">animal1</a>
<a href="search.php?animal=2" id="link2">animal2</a>
<a href="search.php?animal=1" id="link3">animal1</a>
<a href="search.php?animal=3" id="link4">animal3</a>
Hovering over link1 would also highlight link3 and vice versa. Don't hesistate to ask questions about my scenario if i havent explained well enough. Ive been scratching my head on this for the past 4hrs - Ive tried putting <span></span> with document.getElementById("link3").style.backgroundColor("red"); around the anchor tag for link1 in hope that hovering over link1 would highlight link3 but to no avail. Any help would be much appreciated. Thanks.