Submit FAQs Awards Usage Terms Contact
Categories
Other Sections
Sweet Ads
Compatibility
Bookmark online:

FF1+ IE5+ Opr7+

Sticky Note script

Author: Dynamic Drive

Description: Sticky Note is an attractive DHTML script that pops up at the center of the page to display anything of your choice. It's an effective yet graceful way to reach out to your visitors. To make this script truly usable, we've added the following features to it:

  • 3 different modes of display: 1) Every time the page loads 2) Once per browser session using cookies 3) Or, random frequency of 1/x, where x is customizable.
  • Toggle the "fading" effect on and off.
  • Specify the duration of the fading effect (ie: 1 second).
  • Specify whether sticky note should automatically disappear after x seconds (default is by manually clicking on a link).
  • Specify whether sticky note should follow the user around even if he/she scrolls the page.
  • Script functional in IE5+, NS6+, and Opera 7+, and simply does not appear in older DHTML browsers.

Note that the fading effect is slightly different in IE5+ and NS6+ due to two different technologies used. In Opera7, there is no effect.

Well, run along and enjoy this script now!

Demo:


Directions: Developer's View

Step 1: Add the below code to the <HEAD> section of your page:

Select All

Edit the style sheet to configure the basic look of the Sticky Note. Then, refer to the comments contained inside the script to set the variables.

Step 2: Insert the below HTML within the BODY section of your page, preferably at the very end:

Select All

The code of Step 2 is where you enter the HTML you wish to display.

Display any content here, from text, images, to rich HTML. Use the close link to dismiss the box. Click the close box to dismiss it.
Hide Box