WordPress.org

Ready to get started?Download WordPress

Forums

Adding a Hover Image (4 posts)

  1. TheTwoMcClouds
    Member
    Posted 1 year ago #

    I'm not sure if this is something you awesome guys can help me with but I just can't figure this out on my own. I've been trying to create a hover image on my about page. Where it has a picture and when you hover over it it changes to another image. Well in my pages' edit section it works just fine but as soon as I hit preview all it shows is the hovered image not the original one. Here is my code.

    <img onmouseover="this.src='http://www.thetwomcclouds.com/wp-content/uploads/2013/04/MouseOverAndy.jpg'" onmouseout="this.src='http://www.thetwomcclouds.com/wp-content/uploads/2013/04/The-Two-McClouds-2-of-4.jpg'" src="http://www.thetwomcclouds.com/wp-content/uploads/2013/04/The-Two-McClouds-2-of-4.jpg" alt="" />

    Thanks so much for your time even if you don't have the answer ;)

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    Post the page as an obscure link very temporarily and test on a modern (full screen) browser, please. Previews may not run all code...

  3. Creatrix
    Member
    Posted 1 year ago #

    Have you tried publishing the page and not previewing it?
    I've had cases in the past where only when the page has been published the code works - may not apply to all.

    Alternatively, this plugin is pretty good at doing the job.

  4. Try this instead:

    <img src="http://www.thetwomcclouds.com/wp-content/uploads/2013/04/The-Two-McClouds-2-of-4.jpg" onmouseover="this.src='http://www.thetwomcclouds.com/wp-content/uploads/2013/04/MouseOverAndy.jpg'" onmouseout="this.src='http://www.thetwomcclouds.com/wp-content/uploads/2013/04/The-Two-McClouds-2-of-4.jpg'" alt="" />

Topic Closed

This topic has been closed to new replies.

About this Topic