Happy How To’s Day!
Today, I thought I’d show ya how we make our photos move with a mouseover how to!
First up, you’ll need to choose which two photos you’d like to use.
(Tip: The key to really making your “presto change-o” dramatic is to shoot your before and after photos as close to the same angle as possible.)
I’m going to use the following two photos of our (work-in-progress) master bedroom as an example.
Photo #1 is saved as: master_bedroom_before.jpg
Photo #2 is saved as: master_bedroom_after.jpg
Once you’ve decided which two images you’d like to use, you’ll need to upload the them to some kind of image hosting site so that they both have their own URL addresses.
We store our images on Photobucket, so I’m going to show you how to do it using their site, but a site like Flickr or Picasa would work the same way too.
Here is the rollover code you’ll need to post into the html section of your blog post:
<img onmouseover=”this.src=’BEFORE PHOTO URL ADDRESS CODE GOES HERE'” onmouseout=”this.src=’AFTER PHOTO URL ADDRESS CODE GOES HERE‘” src=”BEFORE PHOTO URL ADDRESS CODE GOES HERE” alt=”” />
You will be replacing the words BEFORE PHOTO URL ADDRESS CODE GOES HERE, and AFTER PHOTO URL ADDRESS CODE GOES HERE with the newly-created URL addresses of your before and after photos.
(Tip: Sometimes, in WordPress, if you’re jumping between html and visual, the code will change and the rollover effect won’t work. Make sure you hit “save draft” while you’re still in HTML mode, before you preview it in VISUAL mode. That seems to stop it from changing the code. If you’re still having trouble, click on this link to open the code as a separate text file. Mouseover Code)
First, upload the two photos you’d like to use to the photo hosting source of your choice. In Photobucket, you can hover over the photo once it’s uploaded and four different code options will pop up…
You want to copy the direct link code of your before picture…
…and replace the words BEFORE PHOTO URL ADDRESS CODE GOES HERE with it, like this…
<img onmouseover=”this.src=’http://i268.photobucket.com/albums/master_bedroom_before.jpg’” onmouseout=”this.src=’AFTER PHOTO HTML CODE GOES HERE’” src=”http://i268.photobucket.com/albums/master_bedroom_before.jpg” alt=“” />
(Tip: Make sure you replace both sets of the words BEFORE PHOTO HTML CODE GOES HERE. And, if you replace any of the quotation marks, the presto change-o will not work and you’ll have to start over.)
Notice the AFTER PHOTO URL ADDRESS CODE GOES HERE text is still there in the middle of the paragraph above. You’ll want to replace that text with your after photo direct link code, like this:
<img onmouseover=”this.src=’http://i268.photobucket.com/albums/master_bedroom_before.jpg’” onmouseout=”this.src=’http://i268.photobucket.com/albums/master_bedroom_after.jpg’” src=”http://i268.photobucket.com/albums/master_bedroom_before.jpg” alt=”” />
Again, make sure you don’t replace any of the quotations or apostrophe’s or the rollover effect will not work.
And that’s it! You’re images should now flip back and forth when folks move their cursor over them, like this…
One last thing I wanted to mention was that an easy way for me to remember that the after photo goes in the middle of the rollover code is that you usually want that photo to be a surprise. In other words, you want it to be “hidden” in between your before photos. That way, when your blog post loads, readers will see the before photo first, and once they hover over it, pow! It switches to your after photo!
Now it’s your turn!
If you already know the link party drill, feel free to scroll on down and link away!
If you’ve never linked up to a link party before, here’s how it works…
1. Scroll down this page until you see the “add your link” button. Click it, and create a super-descriptive name for your link. Something like, “How To Make Carrot Cake”, or “Spring Wreath Tutorial”. That’ll make it easier for folks to browse through all the links.
2. Make sure you link directly to the How-To post you’d like to share– not to the main page of your blog.
3. If you’d like to invite some more folks to the party, feel free to slap this button at the end of your how-to post on your blog. Just copy and paste the code in the box below into the html part of your post, and voila!
<div align="center"><a href="https://theletteredcottage.net/?p=6662" title="The Lettered Cottage"><img src="http://i268.photobucket.com/albums/jj29/LaylaPalmer/How%20To/How_To_Linky_Button.jpg" alt="The Lettered Cottage" style="border:none;" /></a></div>
Thanks for partyin’ with us, and hope you have a Happy To’sday!