I’m seeing quite a bit of traffic to this post. I suppose I should explain that this was a quick hack to see if I could get image rollover to work on a friend’s wordpress.com hosted blog (and no, I couldn’t). This little example doesn’t do preloading, either, and I really don’t have any intention to develop this further. Sorry …
<img title="this" onmouseover="this.src='http://scruss.com/wordpress/wp-content/uploads/2010/01/that.png';" onmouseout="this.src='http://scruss.com/wordpress/wp-content/uploads/2010/01/this.png';" src="http://scruss.com/wordpress/wp-content/uploads/2010/01/this.png" alt="" width="192" height="116" />
This does not work on wordpress.com hosted blogs; it gets stripped out.
Update: You probably want to install the plugin Ultimate TinyMCE, which does the job rather well.
I figured it out. If you use the Pinterest Pin it plugin for Images, you have to turn it off for the individual post.
Yes, this code is very crude, and I can imagine situations where it wouldn’t work.
How could I link a image of the code href=”” to a link?
Thanks in advance.
@Yoli:
after placing rollover image with this code, select it and click link button from tool bar.
Its that simple and it works for me.
btw , thanks for this code
How do you make it link to a page?
It’s explained here.
If your looking for a jquery image hover plugin for WordPress please check this out:
wpvisualslideboxbuilder.com/jquery-image-slider-for-wordpress/
thanks, it’s fantastic & helpful.
Thanks man i was also figuring out that finally gotcha.
If you permit A want to same post on my WordPress.