New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact
Categories
Other Sections
Sweet Ads
Compatibility
Bookmark online:

FF1+ IE5+ Opr7+

Shake Image script

Author: Dynamic Drive

Description: Move over JavaScript onMouseover scripts, your DHTML cousin is in town. The very first of its kind anywhere on the web (as least at time of writing), this script "shakes" an image when the mouse comes in contact with it. Use it to add instant eye-popping effect to your image links. Works in IE4+ and NS6+.

Demo: Move your mouse over any of the following three images:




Directions Developer's View

Step 1: Insert the below into the <head> section of your page:

Select All

Step 2: Add the below inside the <img> tag of all of the images you want the effect applied to:

Select All

An example would be:

<img src="man.gif" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this);top.focus()" onClick="top.focus()">