https://github.com/knadh/jqdialog
A jQuery plugin with smooth and peristent dialog boxes meant as a replacement for alert(), confirm(), and prompt()
https://github.com/knadh/jqdialog
Last synced: about 1 year ago
JSON representation
A jQuery plugin with smooth and peristent dialog boxes meant as a replacement for alert(), confirm(), and prompt()
- Host: GitHub
- URL: https://github.com/knadh/jqdialog
- Owner: knadh
- Created: 2011-09-21T19:44:57.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2013-08-08T07:30:25.000Z (almost 13 years ago)
- Last Synced: 2025-03-19T00:17:58.520Z (about 1 year ago)
- Language: JavaScript
- Homepage: http://kailashnadh.name/code/jqdialog/
- Size: 128 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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" />');