That was one fine suggestion, Medyman! Works like a charm. Thank you very much for the help, it's very appreciated.
One last question, though... to those of you more familiar with jQuery... is there any way I could turn the code below into some some sort of array? So that I don't have to repeat it over and over again to add different replacements?
Code:
$(document).ready(function() {
$("*:contains('WORD GOES HERE')", document.body)
.contents()
.each(
function() {
if( this.nodeType == 3 ) {
$(this)
.replaceWith( this
.nodeValue
.replace( /WORD GOES HERE/g, "<img src='images/layout/house.png' alt='house icon'>" )
);
}
}
);
});
Bookmarks