changing background color of a cell

E

effendi

Sorry to ask this again. There has been quite a bit of post on this.

I have table with cells with the classes workspaces. The table has not
background color but onmouseover I changed the cell backgroundColor to
blue. I have to do something similar on mouseout to "remove" the blue
since my table is transparent, how do I accomplish that?

Thanks in advance.
 
M

Martin Honnen

I have table with cells with the classes workspaces. The table has not
background color but onmouseover I changed the cell backgroundColor to
blue. I have to do something similar on mouseout to "remove" the blue
since my table is transparent, how do I accomplish that?

How about setting
element.style.backgroundColor = 'transparent';
?
Or simply
element.style.backgroundColor = '';
if you want to remove the inline style setting. That will only work if
you did
element.style.backgroundColor = 'blue';
before, not if you set some style class or manipulated a rule in a
stylesheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top