Go to file
Kailash Nadh f8dc7e4dca Fixed flickering of dialog boxes 2013-08-08 13:00:06 +05:30
README.md Linebreak fix 2011-10-18 16:23:36 +01:00
index.html Changed the demo in index.html. Demo dialogs don't show a native alert() anymore, but change the value of an element on the page 2011-10-18 16:21:38 +01:00
jqdialog.css Fixed flickering of dialog boxes 2013-08-08 13:00:06 +05:30
jqdialog.js Fixed flickering of dialog boxes 2013-08-08 13:00:06 +05:30
jqdialog.min.js Fixed flickering of dialog boxes 2013-08-08 13:00:06 +05:30
jquery.min.js Fixed flickering of dialog boxes 2013-08-08 13:00:06 +05:30

README.md

jQdialog

jqDialog is a small (3.6 KB minified) dialog plugin that provides smooth, persistent, non-intrusive alternatives for alert(), confirm() and prompt(). There is also a notify() dialog that pops up and goes away in X seconds.

Kailash Nadh, September 2011

Documentation: http://kailashnadh.name/code/jqdialog

License: GNU Public License, http://www.fsf.org/copyleft/gpl.html

Example

// notify dialog
$.jqDialog.notify("This dialog will disappear in 3 seconds", 3);

// alert dialog
$.jqDialog.alert("This is a non intrusive alert", function() {	// callback function for 'OK' button
	alert("This intrusive alert says you clicked OK");
});

// prompt
$.jqDialog.prompt("Please enter your name",	// message
	'Sam',	// default value in the input
	function(data) { alert("Your name is " + data); },		// callback function for 'OK' button
	function() { alert("This intrusive alert says you clicked Cancel"); }		// callback function for 'Cancel' button
);

// confirm dialog
$.jqDialog.confirm("Are you sure want to click either of these buttons?",
	function() { alert("This intrusive alert says you clicked YES"); },		// callback function for 'YES' button
	function() { alert("This intrusive alert says you clicked NO"); }		// callback function for 'NO' button
);

// custom content
$.jqDialog.content('No dialog controls, just custom content<br /><input type="text" name="test" />');