Javascript Help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

Javascript Help

Post 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
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

Re: Javascript Help

Post by mad_phpq »

anyone?
Post Reply