Start with the Search Highlight plugin.
http://www.jquery.info/spip.php?article50

Option 1.  Change the way the plugin works to add A links instead of spans.
See the line in the code that says:
var repl = $.merge([],$("<span>"+newtext+"</span>")[0].childNodes);
Change that to use <a href="">...

Option 2. Use the livejQuery plugin after the searchHighlight works.
http://brandonaaron.net/docs/livequery/

This allows you to listen for span class="hilite" and add a "click" function
to them.
$('span.hilite')
    .livequery('click', function(event) {
        var theGuysName = $("this").text();
        runRedirectFunction(theGuysName);
        return false;
    });

Completely untested.  Does it get you going?

Glen

On 9/14/07, Dan <[EMAIL PROTECTED]> wrote:
>
>
> Hi there,
>
> I'm a relative jQuery newcomer, and I've googled high and low but
> can't seem to find an answer to my problem.
>
> I've got a page of concerts for this conductor I'm working on, it
> generates the page contents from a mysql database.
>
> There are certain composers which are particularly important and have
> their own dedicated pages elsewhere on the site.
>
> What I would like to do is scan through the page for mentions of each
> composer and then turn these instances into links to each composer's
> page.
>
> Is this possible or is there a plugin that might do what I want? I'm
> going insane here.
>
> Thanks in advance,
> Dan
>
>

Reply via email to