I use iambriansreed code from this topic to bold some text and its works fine. But i want to find multiple words like BMW, Mini Cooper etc in all title ID's on the same page and its not working. Here is example http://zazl.linuxpl.info/title/ Any ideas? Im not jquery programmer at all.
Here is code:
$(window).load(function() {
// ADD BOLD ELEMENTS
$('#titleh:contains("Mini Cooper")').each(function(){
$(this).html(
$(this).html().replace(/Mini Cooper/g,'<span class="firstWord">$&</span>')
);
});
$('#titleh:contains("BMW")').each(function(){
$(this).html(
$(this).html().replace(/BMW/g,'<span class="firstWord">$&</span>')
);
});
});
I ask new question in accordance with AlexKM answer in mentioned topic.