Javascript Help
Posted: Wed Sep 10, 2008 11:12 am
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?
[cellName] just doesnt cut it. Anyone know how i can insert the cell name (id) into these two jQuery statements.
Cheers
--Mark
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');
}
}Cheers
--Mark