Find a value inside of class and display a link

Hi all we are in desperate need of a solution, we have tried and search different methods but none of us can figure it out.

Basically we need to find a word which is inside a class and display a link.

So something like this

find a word equal to “1 line custom”

then

display this <a href=“/1-line-custom.htm”>click here</a>

I’m not sure if this is really simple or not.

Any help would be much appreciated.

Thanks

Will

Ok so we are getting close, basically what this is doing now is finding the words inside a class then showing us them in an alert.

<table>
  <tbody>
    <tr>
      <td><div class="productitemcell">Champagne Weadding</div></td>
      <td><div class="productitemcell">1 line custom</div></td>
    </tr>
  </tbody>
</table>

function displaymessageNow()
{
var divArray = document.getElementsByClassName("productitemcell");

for (var i = 0; i<divArray.length; i++)
{
if (divArray[i].class="productitemcell")
alert(divArray[i].innerHTML);
}
}
displaymessageNow();

But this is obviously not the final result we are after.

We need to be able to find the words “1 line custom” in the background (so the user dosnt see this happening) then once these words are found display a link.

Let me know if this is making any sense to you.

Thanks

You want to find text and change that text to a link, so if the text was spider on a page called “fear of spiders” you would change the word “spider” to a link advertising spider cages?