Support » Everything else WordPress » image mouseover works when editing page, not when published

  • Resolved dora_m


    Hi, I’ve got a few icons on my homepage which I would like to have change on mouseover. They all work when I’m looking at the page in editing mode, but when I publish it only one works.

    Here’s the site:

    Here’s the code I’m using for the mouseover images:
    <a href="" rel="attachment wp-att-273"><img class=" wp-image-273 alignleft" onmouseover="this.src=''" onmouseout="this.src=''" alt="illustrations of creatures" src="" width="175" height="266" /></a>

    That’s the image that works on the published page.

    <a href="" rel="attachment wp-att-581"><img class=" wp-image-581 alignright" onmouseover="this.src=''" onmouseout="this.src=''" alt="illustrations of people" src="" width="150" height="280" /></a>

    THat’s the code for one of the non-working images. I don’t see any differences… Any help would be much appreciated! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • I took a look at your site, and the code I see for the “people” images looks like this:
    <img width="150" height="280" src="" alt="illustrations of people" onmouseout="this.src=''" onmouseover="this.src=''" class=" wp-image-581 alignright">
    See how the URL for the onmouseover event is:
    If I browse to that URL, it is the same image, so it appears the onmouseover isn’t working, when it really is.

    I’m not seeing any javascript errors, so I believe your code is correct except for the onmouseover URL. Since the code I’m seeing is not what you have above, maybe what I’m seeing is a cached version of the page if you have a caching plugin installed and activated?

    Cool images, by the way.

    Thank you!!

    It was the caching, I guess — I turned off Photon in Jetpack and now it’s working. I had noticed that the image URLs were changing to “” but I didn’t realize why that was happening or what it was doing!

    Thanks again for your help 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘image mouseover works when editing page, not when published’ is closed to new replies.