Jump to content

Mouseover with images

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
i believe this is possible since i seen it before. What i want to have is code that has an image that shows in white color and when you moveover it, it turns a color. I know it requires 2 images but that is all i know.

#2
RobSoftware

RobSoftware

    Programmer

  • Members
  • PipPipPipPip
  • 143 posts
So basically you want the image to change to a new image when you do a mouseover?

#3
Frantic

Frantic

    Learning Programmer

  • Members
  • PipPipPip
  • 91 posts
You will need to use javascript for this, not html.

You could do it with CSS as well and thats more recommended than using javascript.

#4
DevilsCharm

DevilsCharm

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
If you design a web page with Flash, that's easy, and as Frantic said it's possible to do with Javascript (although I didn't know that).

#5
Dan

Dan

    Programmer

  • Members
  • PipPipPipPip
  • 145 posts
Simple!

<script language="Javascript">

<!--

//Slide Show script (this notice must stay intact)

//For this and more scripts

//visit java-scripts.net or http://wsabstract.com


if (document.images) {

     button1 = new Image

     button2 = new Image


     button1.src = 'img1.gif'

     button2.src = 'img2.gif'

 }

//-->

</script>

Obviously you can edit the values above to match your requirements.

#6
Jimbo

Jimbo

    Programmer

  • Members
  • PipPipPipPip
  • 121 posts
I'd use css to do this

http://www.google.co...?q=css rollover

loads of tutorials there

#7
egon

egon

    Newbie

  • Members
  • PipPip
  • 13 posts
Dan, I'm not good at all with JavaScript, but shouldn't he use the on.mouseover() function?

#8
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
Nice, CSS looks a lot easier than Javascript. I didn't realize CSS could do this.

#9
xtraze

xtraze

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 910 posts
I have found some nice tutorials at JavaScript Kit- Comprehensive JavaScript, DHTML, CSS tutorials and over 400+ free JavaScripts! and here is the link to the place you must go to get whatever you want.
JavaScript Kit- Images and music scripts