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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top