Friday, April 24, 2009

jQuery Alert Dialogs

This jQuery plugin aims to replace the basic functionality provided by the standard JavaScript alert(), confirm(), and prompt() functions. What's the benefit of using custom methods? Well, a few good reasons, really: - These are completely customizable via CSS (which can make your apps look much more professional) - You can set a custom title for each dialog - IE7 users get an ugly warning and usually have to reload the page if you use a regular prompt() These methods simulate a true modal dialog box. They will automatically re-position themselves if you resize the browser window (unlike many existing dialog/lightbox-style plugins). If you include the jQuery UI Draggable plugin, the dialogs can be moved by dragging their title bars. Everything you need to produce the dialogs in the demonstration is included in the download.
Here is the syntax of the dialogs which are the alert, confirm and the prompt function. All these three functions take same number of arguments, except the Prompt function which take an extra parameter which is the value.

jAlert( message, [title, callback] )
jConfirm( message, [title, callback] )
jPrompt( message, [value, title, callback] )

You can find detail of the alert plug-in by clicking here . And download the examples from there.

All and any comments / bugs / suggestions are welcomed!


No comments: