#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,323
January 2004
todge
|
Post by Todge on Apr 1, 2007 14:50:35 GMT -8
This allows you to have a different Image Highlight for different categories on you main page..
<script type="text/javascript"> <!-- /* Different Image Highlight for different categories By Todge Copyright © 2007 Please leave this header intact */
function highlight(catagory,pic) { var cats = document.getElementsByTagName('td'); for(c=0; c<cats.length; c++) { if(cats[c].className == 'catbg' && cats[c].firstChild.nodeName == 'A' && cats[c].firstChild.name == catagory) { while(cats[c+1].className != 'catbg') { c++ if(cats[c].className == 'windowbg2' && cats[c].width == '66%') { cats[c].onmouseover = function(){this.style.backgroundImage = 'URL('+pic+')';} cats[c].onmouseout = function(){this.style.backgroundImage = '';} }} return; }}}
// Edit below...
highlight('CATEGORY NAME','URL OF IMAGE'); highlight('CATEGORY NAME','URL OF IMAGE');
// Edit above... // --> </script>
Put it in you Main Footer and edit these lines...
highlight('CATEGORY NAME','URL OF IMAGE'); highlight('CATEGORY NAME','URL OF IMAGE');
Red is the name you gave the category when you created it Blue is the URL of the image you want shown when the mouse rolls over it
|
|