So, You Want An Image Flip, Huh? | HTML Goodies

So, You Want An Image Flip, Huh?

Written By
Joe Burns
Joe Burns
Jan 4, 2005
4 minute read


Use these to jump around or read it all…


[The Parts]

[The Script]

[Denote The Images]

[Call For The Script]

[More Than One Image Flip On A Page]


     This is one of the most asked-for items on the HTML Goodies site, an image flip. There has been a tutorial on image flips posted for a long time now, but the script employed gave MS Explorer some fits until some changes were made. It’s an excellent script though and is still a great JavaScript tutorial to walk through. Heck, you may like it better than this new script. To see the previous Image Flip Tutorial, click here.

     This new script is much shorter and more compact. It also works cross-browser with no trouble. Plus it’s a snap to configure for your own use. Even better, it’s an active image so it can be clicked on to go to another page! Here’s the effect: Run your mouse over the image!










The Parts

     You’ll need four things to make this work: Two images, a JavaScript, and a command that calls for the images and the effect of the script.

     The effect I put together up there is done with two images named goof3.gif and
goof4.gif. Why “goof,” you ask? Because I’m
your father, that’s why! Actually, that’s not the answer, but I’ve always wanted to say that. A better question to ask is why 3 and 4 instead of 1 and 2? Well, here’s the reason: I don’t know.

     There. Now that that’s settled….



The Script

     You should have been able to get the two images from the links above. If you haven’t already, do so. Now you need the script. This will go between the and commands on your page. You can copy and paste it right from here.




HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.