Results 1 to 2 of 2

Thread: help?

  1. #1
    Join Date
    Oct 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help?

    i'm quite a novice... can anyone help with how i could make a picture change when someone mouses over text on the page.
    it's an effect like on this page:http://www.sunphotographics.com/albums.shtml
    if you roll over one image (or text) another main image changes.

    thanks for any help

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You can add a mouseover and mouseout to more or less any tag:
    HTML Code:
    <img src="image1_1.png" name="switchimg"/>
    <img src="image2_1.png" name="switchimg"/>
    <img src="mouseoverme.png" onmouseover="document.images['switchimg'][0].src='image1_2.png';"/>
    <!-- Image to mouse over -->
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed suscipit nulla sed est.
    Nulla sit amet orci. Integer eleifend pulvinar est. Cras a lectus viverra purus dignissim 
    volutpat. Fusce ac ligula nec neque tempus iaculis.
    <span onmouseover="document.images['switchimg'][1].src='image2_2.png';">Text to mouseover</span>
    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
    egestas. Suspendisse magna. In in libero at sapien molestie tempus. Nam sapien dui,
    vestibulum rutrum, posuere fermentum, feugiat eu, mauris. Donec ut quam. Suspendisse
    posuere lacinia massa. Sed at arcu. Duis mattis.</p>
    Last edited by Twey; 10-05-2005 at 05:17 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •