Peter
Junior Member
Coding God
Posts: 50
|
Post by Peter on Apr 29, 2006 13:17:46 GMT
<script type="text/javascript"> <!--
// Category or title text to image
var tCat = document.getElementsByTagName("td");
function textToImage(text,image){ for(t = 0; t < tCat.length; t ++){ var re = new RegExp("<b>" + text + "</b>","i"); if(tCat.item(t).className.match(/^(cat|title)bg/i) && tCat.item(t).innerHTML.match(re)){ tCat.item(t).innerHTML = tCat.item(t).innerHTML.replace(re, "<img src='" + image + "'>"); } } }
textToImage("TEXT","IMAGE URL"); textToImage("TEXT","IMAGE URL");
//--> </script>
Add to main footer.
Just change the TEXT and IMAGE URL, feel free to add more lines if needed.
|
|