SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question i require a source for when i hover over an image it changes to another image!!

    hi im trying to design a web page for my uni project in this web page i have thumbnail imges what i would like to achieve is that when i hover over an image with my mouse another image appears an over rights the previous image. if i was to go over the imge again then the image would change to nother image and over write the previous image and if i was to go over the image again then the image would go back to the first image. so its like images layerd behind each other. would ene1 knw how to do this thnx mathew.

  2. #2
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You want to use what is called a rollover.

    http://www.google.com/search?hl=en&q...earch&aq=f&oq=

    The basics would be this:

    Code:
    <img src="image1.gif" onMouseOver="this.src='image2.gif'" onMouseOut="this.src='image1.gif'" />
    You may have to add a "return false;" after the src change, i'm not sure, I haven't done this in a while. Just read over one of those tutorials linked above and it will explain.
    Nick . all that we see or seem, is but a dream within a dream
    Show someone you care, send them a virtual flower.
    Good deals on men's watches

  3. #3
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    hi thnx 4 dis. the images do rollover but then the third image rolls over when i move my mouse of the second image what i would like is dat the second image stays when i move my mouse of it and then when i put my mouse over the image again then it changes to the third image. i think i have to use the return false code but i dnt knw wher i would add it in my source. fnx mathew

  4. #4
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To clarify - when you rollover imageX the first time, it changes to imageY, and stays that way even when you roll off? And then when you rollover it the next time, it changes to imageZ, and stays on imageZ even when you roll of? Is this correct?
    Nick . all that we see or seem, is but a dream within a dream
    Show someone you care, send them a virtual flower.
    Good deals on men's watches

  5. #5
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes this is correct nd if i was to rollover imageZ it would go bak to imageX and keep going in that circle (LOOP). thnx
    Last edited by mathew_1989; Nov 27, 2008 at 14:01.


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
  •