FF1+ IE5+ Opr7+

Trembling message

Author: Dynamic Drive

Description: Make select messages on your page "shiver" slighly to draw attention to them, with this text script. Likely candidates to put out in the cold are important announcements, advertising text etc. The tremor works in both IE4+ and NS6+.

Demo: Looking for JavaScripts? Visit JavaScript Kit!

Directions Developer's View

Step 1: Copy the below code and paste it into the <HEAD> section of your page:

Select All

Step 2: With the above in place, you are now ready to make a message tremble. Simply wrap the following <span> tag around it:

<span id="jiggle0" class="jc"><b>Looking for JavaScripts? Visit <a href="http://javascriptkit.com">JavaScript Kit!</a></b></span>

To apply the effect to multiple messages on the page, repeat step 2, but increment the ID attribute of the <span> from "jiggle0" to "jiggle1" etc, depending on the number of messages.

That's a wrap!

Technical Note

This script accesses the BODY onload event (window.onload). If you have another script on your page that does the same, one of them will not run. Click here for information on getting both scripts to work simultaneously.

While you can apply the tremble effect to multiple text, for efficiency sake, you should try to limit it to atmost 3 per page.

Wordpress Users: Step by Step instructions to add ANY Dynamic Drive script to an entire Wordpress theme or individual Post