Harleys Help Hut
A little help for you since 2006
  • Help & How To
  • Recipes
  • How To Use Flip Me Clone
  • E Books
  • Prisoner : Cell Block H
    • Episodes 001 – 100
      • Episodes 001 – 025
      • Episodes 026-050
      • Episodes 051-075
      • Episodes 076 – 100
    • Episodes 101 – 200
      • Episodes 101 – 125
      • Episodes 126-150
      • Episodes 151 – 175
      • Episodes 176 – 200
    • Episodes 201 – 300
      • Episodes 201 – 225
      • Episodes 226 – 250
      • Episodes 251 – 275
      • Episodes 276 – 300
    • Episodes 301 – 400
    • Episodes 401 – 500
    • Episodes 501 – 600
    • Episodes 601 – 692

How To Make An Image Change on Hover – Rollover Image

Recipes

  • Quck Cherry Dessert

Helpful Stuffs

Below please find the code to create the rollover.

<a href="TARGET URL GOES HERE"><img src="URL OF FIRST IMAGE GOES HERE" onmouseover="this.src='URL OF SECOND IMAGE GOES HERE'" onmouseout="this.src='URL OF FIRST IMAGE GOES HERE'" /></a>

This is the result:

Naturally you will have to change the image urls and linked to address according to your needs.
Customize the code by adding the images you want to use & the address you want it to lead to.

With that in mind, change these to suit your needs.

1. Change the TARGET URL GOES HERE line with the address of wherever you want
your reader to be taken to when they click on the image.

2. Change the URL OF THE FIRST IMAGE ( there are two of these, use the same image url for both )
This is the image that automatically appears without any mouse over. No one need to do anything to see this image.
It will be the FIRST image.

3. Change the URL OF SECOND IMAGE GOES HERE
This will become tour mouse-over or hover over image.
Place the url to this second image here.

EASY TRICK TO REMEMBER:

4. What I do is use the code placed above as a “guide” handy in a hidden post and replace the urls as required in posts and pages wherever I need these. It makes having to remember the code a non issue.

If your theme or a plugin allows for it, and if you are linking to a video, you can also
have it open in a lightbox. Please refer to your theme / plugin’s specific documentation for any shortcode that it may use.

change image on mouse over, image mouse overs, image rollovers

(c) 2022 Harleys Help Hut