https://github.com/bigbinary/iconfirm
an inline confirmation plugin based on jQuery
https://github.com/bigbinary/iconfirm
Last synced: about 2 months ago
JSON representation
an inline confirmation plugin based on jQuery
- Host: GitHub
- URL: https://github.com/bigbinary/iconfirm
- Owner: bigbinary
- Created: 2010-10-20T16:10:34.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-09-19T00:56:36.000Z (over 13 years ago)
- Last Synced: 2025-04-13T12:12:46.364Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://neerajdotname.github.com/iconfirm/
- Size: 778 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#iconfirm is an inline confirmation plugin based on jQuery#
### Demo
[http://neerajdotname.github.com/iconfirm](http://neerajdotname.github.com/iconfirm)
### Usage
// using default options
$("a.delete").iconfirm();// using some custom options
$("a.delete").iconfirm({
okLabel: "Continue",
cancelLabel: "Do not proceed",
initCallback: function(elem) {
elem.parent().fadeIn();
}
});### Configuration Options
msg string "Are you sure? "
okLabel string Label for proceed message (default: "Continue").
cancelLabel string Label for cancel message (default: "Cancel").
separator string Separator between the okLabel and cancelLabel (default: " | ").
timeout integer seconds before the confirmation dialogue closes automatically, 0 to
disable this feature (default: 0).
initCallback function function that will be invoked when user clicks on the original link.
cleanupCallback function function that will be invoked when user clicks on 'cancel' or the whole
operation times out.
yesCallback function function that will be invoked when user clicks on 'continue'.### CSS
To display the inline confirmation message, a span html tag is created with class iconfirm. Use this class to properly decorate the confirmation message using css.
### jQuery version
I have tested this plugin with jQuery 1.4.2 and 1.4.3 .
### License
MIT
### Copyright
Neeraj Singh ( [email protected] )
### TODO
* write test
* explain why return false is being used