D
Dave Smithz
Hi there,
I want to change the CSS style sheet applied to a table cell when the mouse
moves over it. But I am not sure how to do it.
I have written a function like this:
function highlight_cell (obj) {
obj.styleSheet="navHighlightCell";
};
Which has associated style sheet like this:
..navHighlightCell {
background-color: #FFFFFF;
}
But it does not work. I know I can just use the following code in the
function
obj.style.backgroundColor='#FFFFFF';
I have got this to work, but I do not want to hard code colours or anything
like that. I want to keep them in stylesheets.
Obviously the solution should be one that is cross browser compatible.
Can anyone help?
Kind regards
Dave
I want to change the CSS style sheet applied to a table cell when the mouse
moves over it. But I am not sure how to do it.
I have written a function like this:
function highlight_cell (obj) {
obj.styleSheet="navHighlightCell";
};
Which has associated style sheet like this:
..navHighlightCell {
background-color: #FFFFFF;
}
But it does not work. I know I can just use the following code in the
function
obj.style.backgroundColor='#FFFFFF';
I have got this to work, but I do not want to hard code colours or anything
like that. I want to keep them in stylesheets.
Obviously the solution should be one that is cross browser compatible.
Can anyone help?
Kind regards
Dave