SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    switch image on hover

    right now i'm building a menu and each link has an icon next to it. how can i make it so that the icon switches when i hover over the text next to it? i'm trying to make it look like the icon is turning on when you hover over it.

    any help is greatly appreciated

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Depends on your implementation. Show what you got so far and and we can take it from there.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <table>
    <tr>
    <td><img src="thisimageneedstochange.jpg"/></td>
    <td valign="middle">Hover this text to change image</td>
    </tr>
    </table>
    theres an example of the code

  4. #4
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to have a reference to the image as well to swap it. So in your function where you change the text, you also change the image src


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
  •