Jump to content

Change the color on mouse over


sudhakarReddy

Recommended Posts

Hi guys, I had a problem on mouse over event. i had a menu and submenu. I am taken that menu & sub menu in table format. I have to show my submenu on mouse over, and at the same time i have to change the color of the table cell also.Iam getting sub menu here, but iam not getting change the color of the my table cell on mouse over.How can i change the color and show the submenu at the same time on mouse over event.here is my code.function showmenu(elmnt){document.getElementById(elmnt).style.visibility="visible"; }function hidemenu(elmnt){document.getElementById(elmnt).style.visibility="hidden"}Plz help me.ByeSudhakar

Link to comment
Share on other sites

I think this should work :)

function showmenu(elmnt){ x=document.getElementById(elmnt); x.style.visibility="visible"; x.style.backgroundColor="red";}function hidemenu(elmnt){ x=document.getElementById(elmnt); x.style.visibility="hidden"; x.style.backgroundColor="white";}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...