vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Cell Highlight - View Topic
Topic Rating: *****
Printable View
Triad
New Member
*

Posts: 5
Status: Offline
Location: Earth
Joined:  
Reputation: 0%  


pm
Cell Highlight (18th Feb 08 at 11:57pm UTC)
This code simply changes the color of the board or thread cell when your cursor hovers over it allowing you to also click anywhere in the cell to go to it's link location.

Edit the bold variables to change the highlight color.

Main Footers.

<script type="text/javascript"><!--
// Cell Highlight

var mainPage = "000000";
var threadPage = "cccccc";


var td = document.getElementsByTagName("td");
for(x=0,y=td.length; x<y; x++){
    if(td[x].width.match(/(69|54)%/i)){
        td[x].onmouseover = function(){
            this.style.backgroundColor = "#" + ((location.href.match(/uk\/board/i)) ? threadPage : mainPage);
            this.style.cursor = "pointer";
        }
        td[x].onclick = function(){
            location.href = this.getElementsByTagName("a")[0].href;
        }
        td[x].onmouseout = function(){
            this.style.backgroundColor = this.bgColor;
        }
    }
}
//--></script>
 Printable View

All times are GMT+0 :: The current time is 11:00pm
Page generated in 0.1013 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums