Well you could do something like this (it would be prohibitively slow
on 250 names on one page though!!) :

var names = ['Stephen','Fred']
$("body").each(
function(){
    var html = $(this).html()
    $(names).each(
            function(i, e){
                var rx    = new RegExp(e, 'gi')
                html = html.replace(rx, '<b style="color:red">' +e+ '</
b>')
                }
        )
    $(this).html(html)
    }
)

If you want to check this out on this page, load jQuery using my
jQuery Favelet...

http://www.keyframesandcode.com/code/development/javascript/jquery-favelet/

...then copy / paste the code into Firebug and run it there.

Reply via email to