0

How do I make an image change when the mouse is over it?

Snippet:

<body>

<!-- Site navigation menu -->
<ul class="navbar">
  <li><img src="C:\Users\Drew French\Pictures\Style\SepiaWeb\button_demo5.png" alt="Button 1" /></a>
rectangletangle
  • 42,965
  • 86
  • 186
  • 264

2 Answers2

1

If you could use jQuery;

$("#ImageID").hover( function() { $(this).attr("src", "new src"); } );

Also check this out Changing the image source using jQuery

Community
  • 1
  • 1
griegs
  • 22,002
  • 28
  • 113
  • 201
1

You can use CSS or Javascript for this.

http://joemaller.com/js-singleroll.shtml

Brad
  • 146,404
  • 44
  • 300
  • 476