Page 1 of 1

Javascript Help

Posted: Wed Sep 10, 2008 11:12 am
by mad_phpq
Hi I have a onmouseover, onmouseout event running this code.

I want to be able to select td cells cell1, cell2, cell3 as I move down links on a column. I use jQuery to change the background color. How can i insert the cell_id that is passed to this function?

Code: Select all

function doHover(cellName,state){
    
    if (state == 'OVER'){
        
        $("td#[cellName]").css('background-color','red');
    }
    
    if (state == 'OUT'){
        
        $("td#[cellName]").css('background-color','#fff');
    }
    
}
[cellName] just doesnt cut it. Anyone know how i can insert the cell name (id) into these two jQuery statements.

Cheers

--Mark

Re: Javascript Help

Posted: Thu Sep 11, 2008 4:29 am
by mad_phpq
anyone?