Skip to content
This repository has been archived by the owner on Nov 13, 2017. It is now read-only.

tornqvist/dialog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery dialog

A responsive, accessible dialog plugin for presenting information and prompting for user action.

Recommended usage

	<a href="ajax.html#bar" title="Important message">Read my important message</a>
	$('a').dialog();

Specific content

$.dialog({
	content: 'Some important message'
});

Specific url

$.dialog({
	url: 'ajax.html'
});

Inline content

$.dialog({
	url: '#foo'
});

Default options

content		: null,				// Specific content to load into dialog
url			: null,				// Specific url to load into dialog, just like any anchor link
speed		: 400,				// Animation speed, needs to match that which is set in CSS (only applicable for browsers not supporting transitionend event)
escape		: true,				// Whether to hijack the escape key to close dialog (only while dialog is visible)
role		: 'dialog',			// The dialogs' role (recommended: dialog/alertdialog)
closeText	: 'Dismiss',		// Text in close button
loadText	: 'Loading',		// Text to show during loading
label		: prefix + '-label',// Dialog title ID, for accessibility
appearence	: 'top',			// Direction of dialog animation (accepts: top, bottom, right, left)
applyClass	: null,				// Custom class to be applied to container (for styling or animation)
request		: 'GET',			// Request method used (accepts: 'GET', 'POST', object)
onOpen		: $.noop,			// Function to run just when dialog is created (but empty) and availible in the DOM
onLoad		: $.noop,			// Function to run when content is loaded and ready
onClose		: $.noop,			// Function to run when dialog is closed
animType	: WIN.Modernizr && WIN.Modernizr.csstransitions ? 'css' : 'animate', // Pick animation technique
visualLoad	: false,			// Whether to show dialog before content is loaded
center		: true				// Whether to vertically center dialog in window (if there's room)

Depedencies

jQuery 1.7

About

A responsive, accessible dialog jQuery plugin for presenting information and prompting for user action.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published