Results 1 to 5 of 5

Thread: image rollovers? (ASAP)

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default image rollovers? (ASAP)

    i need a code that when you hover over it, it changes to the other picture. yes its confusing to explain but i forgot what its callled.....um...anyone know a code for it. its like hover over image 1 and then it changes to image 2 and then when you take your mouse off it goes back to image 1. get it??? i need a code ASAP!


    --thanks :]

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Why not try something like this:

    (Not valid HTML, but notice the onmouseover/out items.)
    Code:
    <img src="1.gif" onmouseover="this.src='2.gif';" onmouseout="this.src='1.gif';">
    Simply change the parts in red to be your original image, and the part in blue to be the image to change to. Tested and works.

    Hope this helps.

    EDIT: Also, this is not just plain HTML, but instead has a little bit of Javascript involved.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Google the code if you want a more complex script. They exist all over the place.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by djr33 View Post
    Google the code if you want a more complex script. They exist all over the place.
    This is true, you may also want to look around the forums. There are several throughout the forums.

    (sorry dj, had to throw that in there as well.)
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Oh, sure. But mouseovers are so common it won't be tough at all. Search "mouseover" or "rollover" anywhere (google, here, another forum, etc.) and you'll get plenty of variations on the scripts.
    Nothing will be more simple than the above, though.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •