showMessage jQuery Plugin

A first attempt at a jQuery Plugin. This was inspired by a similar effect you can see on the Twitter.com site. Some of the advantages:

  • Message displayed at the top of page (no scrolling to view error)
  • Multiple messages can be displayed
  • Options to automatically close the message after set delay
  • Message closes with blur/'esc' key/'close' link

We have moved the project to github. Please feel free to download the plug-in from github or fork your own branch.
Download from gitHub

Change Log

Changes for version 2.4

  1. Found warning for unscoped variable 'event'. Changed line 60 to read keycode = window.event.keyCode;
  2. Added some different styles to the notification windows.

Changes for version 2.3

  1. Plug-in was overwriting the selected element with 'body' element (was accidently hard coded and never properly removed).
  2. Added another option for z-index. Ran into an issue where notification was being placed behind a light box. The new option will give more flexibility to and allow the plug-in to determine various z-index.

Changes for version 2.2

  1. Minor change as per recommendation by Sebastian Kun (http://www.arcestra.com/).
  2. Added options for better 'internationalization' of navigation text. Sebastian added two more options for closeLink text and closeText text.
  3. Removed the jquery.showMessage.pack.js option

Changes for version 2.1

  1. Minor change to option.position. Changed order so looking for top position else set to bottom.
  2. Issue with IE7+ if there is no doctype declared (shame on you, since DOCTYPES are vital to the proper functioning of web standards in browsers), we have changed insertion of #showMessage to either .prepend() or .append() depending on if position is top or bottom.

Changes for version 2.0

  1. Received a request to make some improvements to the plugin from DaveG. Thank you much for the constructive comments DaveG.
  2. Added new option useEsc to allow the 'esc' key to be optional (boolean true|false).
  3. Changed the global variable t to be included in the function and renamed to showMessage_t.
  4. Extended the plugin to use the jQuery.fn (does not return a value so this may not be chainable).

Changes made for verstion 1.4

  1. Updated notification to work from inside iframe. Will now call window.parent.document to make/remove notification.
  2. Updated incorrect style on the message un-ordered list

Bugs

Known Issues

  1. Notification will close when triggered with .change() event. Need to delay or disregard click() event that is fired after change().