How I Change Images on Top of My Site
Someone over at the WordPress forums asked me how I made the little image browser on my site. (Check out the + – < > on the top right of the screen to see what I mean.) So, here it is for anyone to use. It’s pretty simple.
Download the Obvious Diversion image toy
Open the html file in a browser and you’ll see it working. It’s all commented, so moving it into your own site should be easy.
To customize it for your purposes, you should:
- In the imagetoy.js file, change the number of images you will be using and the path to those images
- Replace my sample images with the ones you intend to use and add as many as you like. (Use the obvious naming structure)
- Extra Credit: Replace the switching text to whatever you want (images, other text, etc.)
Please note: I just use it for a cool little extra in my header, but certainly not for my galleries. Why? Because it uses ECMAScript to swap the images and as a result is not compatible with some browsers. For instance, Google can only see the default image.
Have fun with it, make it your own, and if you need me to explain anything better, let me know in the comments.

Permanent Link
Comments (4)


[...] lled a new script that switches/changes/enlarges/etc that image at the top. I found it at Obvious Diversions Pretty cool. I only have 3 images in there so far, mostly for testing. I have [...]
Thank you so much! You have no idea how much this helps someone who doesn’t have a clue how to do this stuff…
Love the site and plan to become a regular reader.
[...] good to go… No Comments so far Leave a comment RSS feed for comments on this post. TrackBack URI Leave a comment Line and paragraph breaks automatic, e-mail address never displayed, HTMLallowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> [...]
that is pretty sweet! thnx for sharing it..
Rod