Javascript Mouse Rollover effects Help

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
mumba
Forum Newbie
Posts: 4
Joined: Thu Dec 09, 2010 12:53 am

Javascript Mouse Rollover effects Help

Post by mumba »

Hi everyone, can someone show me how to create mouse rollover effects like the one used on this website forum topics.I want to implement on my site.

Thank you
User avatar
sergio-pro
Forum Commoner
Posts: 88
Joined: Sat Dec 27, 2008 12:26 pm

Re: Javascript Mouse Rollover effects Help

Post by sergio-pro »

Hi!

This is usually done not with javascript, but with CSS hover state.

It should be something like this:

tr { backgound-color: #ffffff; }
tr:hover { backgound-color: #cccccc; }

The same approach uses this site for topics.

Good Luck
danwguy
Forum Contributor
Posts: 256
Joined: Wed Nov 17, 2010 1:09 pm
Location: San Diego, CA

Re: Javascript Mouse Rollover effects Help

Post by danwguy »

You can also do something like this... <img src="images/imagename.png" onmouseover="this.src='images/imageovername.png'" onmouseout="this.src='images.imagename.ong'" /> and that will take an image and change it to the second image when your mouse is over it, then put it back to the first image when you take your mouse off of it. Good luck and enjoy.
Post Reply