jQuery Selector: Find & "Perform"

jQuery Selector: Find & "Perform"

Dear community,

i want to use jQuery to perform 2 action within my articles:

- create links (for a glossary), attributes needed: href, class, title, target, link text
- highlight terms (for a search function)

first of all, for the highlight-function, i tried:

  1. $("#content_article:contains('Test')").css("text-decoration", "underline");
but then, jQuery underlines ALL content. I just need e.g. "Test" to be underlined (or yellow-backgrounded).

for the second, glossary-function i'm using "tinyTips" for displaying tooltips above an <a> element.

so i need jQuery to find e.g. the string "Test" and perform the following with it:

  1. <a href="#" class="tTip" title="'.$glossary['desc'].'" target="_blank">'.$glossary['tag'].'</a>
.. where $glossary['tag'] represents "Test" in this case.

tinyTip need the "description text in the title attribute.

-> is it possible to access such elements via

  1. ???.attr("href").(???)
!?

many thanks in advance,
chris