{"id":13877488,"url":"https://github.com/fredwu/jquery-inline-confirmation","last_synced_at":"2025-09-08T19:31:12.354Z","repository":{"id":66283113,"uuid":"813862","full_name":"fredwu/jquery-inline-confirmation","owner":"fredwu","description":"Inline Confirmation plugin for jQuery. One of the less obtrusive ways of implementing confirmation dialogues.","archived":false,"fork":false,"pushed_at":"2019-05-06T02:21:29.000Z","size":335,"stargazers_count":53,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T05:06:21.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://fredwu.me/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fredwu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2010-08-03T05:23:36.000Z","updated_at":"2023-02-21T06:52:57.000Z","dependencies_parsed_at":"2024-01-13T19:40:55.758Z","dependency_job_id":"a12bb921-a313-443f-8adc-bc0068c9cd61","html_url":"https://github.com/fredwu/jquery-inline-confirmation","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/fredwu/jquery-inline-confirmation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fjquery-inline-confirmation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fjquery-inline-confirmation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fjquery-inline-confirmation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fjquery-inline-confirmation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fredwu","download_url":"https://codeload.github.com/fredwu/jquery-inline-confirmation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fjquery-inline-confirmation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231438,"owners_count":25245585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:01:03.276Z","updated_at":"2025-09-08T19:31:12.088Z","avatar_url":"https://github.com/fredwu.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Inline Confirmation plugin for jQuery [![endorse](http://api.coderwall.com/fredwu/endorsecount.png)](http://coderwall.com/fredwu)\n\nIn a web app, it is very common to have actions that destroy (delete/remove) data. These actions, if you don’t already know, should always map to POST methods. On top of that, because these actions are destructive, the UI should always ask the user for confirmation.\n\nBut how do we actually implement the confirmation dialogue though? The vanilla JavaScript confirm box would be the easiest but at the same time the ugliest - this thing stalls most web browsers until the user acts on it.\n\nAn inline popup/modal box? Perhaps, but it is still obtrusive, in the sense that the popup/model boxes are usually in the way of other tasks.\n\nMeet __Inline Confirmation__ - a jQuery plugin for creating easy, less obtrusive confirmation dialogues!\n\n## Configuration\n\nThere are a few options to customise the behaviour of this plugin:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cstrong\u003eOption\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cstrong\u003eType\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cstrong\u003eDescription\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003econfirm\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eThe HTML for the confirm action (default: \"\u0026lt;a href='#'\u0026gt;Confirm\u0026lt;/a\u0026gt;\").\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ecancel\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eThe HTML for the cancel action (default: \"\u0026lt;a href='#'\u0026gt;Cancel\u0026lt;/a\u0026gt;\").\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eseparator\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eThe HTML for the separator between the confirm and the cancel actions (default: \" \").\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ereverse\u003c/td\u003e\n    \u003ctd\u003eBoolean\u003c/td\u003e\n    \u003ctd\u003eRevert the confirm and the cancel actions (default: false).\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ehideOriginalAction\u003c/td\u003e\n    \u003ctd\u003eBoolean\u003c/td\u003e\n    \u003ctd\u003eWhether or not to hide the original action, useful for display the dialogue as a modal if set to false (default: true).\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ebindsOnEvent\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eThe JavaScript event handler for binding the confirmation action (default: \"click\").\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eexpiresIn\u003c/td\u003e\n    \u003ctd\u003eInteger\u003c/td\u003e\n    \u003ctd\u003eSeconds before the confirmation dialogue closes automatically, 0 to disable this feature (default: 0).\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003econfirmCallback\u003c/td\u003e\n    \u003ctd\u003eFunction\u003c/td\u003e\n    \u003ctd\u003eThe callback function to execute after the confirm action, accepts the original action object as an argument.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ecancelCallback\u003c/td\u003e\n    \u003ctd\u003eFunction\u003c/td\u003e\n    \u003ctd\u003eThe callback function to execute after the cancel action, accepts the original action object as an argument.\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Usage\n\n``` js\n// using default options\n$(\"a.delete\").inlineConfirmation();\n\n// using some custom options\n$(\"a.delete\").inlineConfirmation({\n  confirm: \"\u003ca href='#' class='confirm-yes'\u003eYes\u003c/a\u003e\",\n  cancel: \"\u003ca href='#' class='confirm-no'\u003eNo\u003c/a\u003e\",\n  separator: \" | \",\n  reverse: true,\n  bindsOnEvent: \"hover\",\n  confirmCallback: function(action) {\n    action.parent().fadeIn();\n  }\n});\n```\n\n## Demo\n\n[Click here for a simple demo](http://fredwu.github.com/jquery-inline-confirmation/).\n\n## Changelog\n\nv1.4.2 [2013-03-07]\n\n- Use jQuery 1.7+'s `on()` instead of the old `live()`\n\nv1.4.1 [2011-07-30]\n\n- Fixed a bug where timeouts aren't being reset correctly. \n- Fixed a bug where the click handler executes the default link behaviour.\n\nv1.4.0 [2011-06-28]\n\n- Added a demo and readme to the repository.\n\nv1.3.1 [2010-08-04]\n\n- Fixed a regression bug that causes `expiresIn` to stop working.\n\nv1.3.0 [2010-08-04]\n\n- Removed `allowMultiple` option as tracking multiple instances of the dialogues is not a good idea (the code was broken anyway).\n- Added the original action object as an argument to the callback functions.\n- Fixed a bug where original actions would disappear.\n\nv1.2.0 [2010-08-04]\n\n- Added `hideOriginalAction` option.\n\nv1.1.0 [2010-08-04]\n\n- Added `allowMultiple` option.\n\nv1.0.0 [2010-08-03]\n\n- Initial release.\n\n## More jQuery Plugins\n\nCheck out my other jQuery plugins:\n\n- [Endless Scroll](https://github.com/fredwu/jquery-endless-scroll) - Endless/infinite scrolling/pagination.\n- [Slideshow Lite](https://github.com/fredwu/jquery-slideshow-lite) - An extremely lightweight slideshow plugin for jQuery.\n\n## License\n\nCopyright (c) 2010-2012 Fred Wu\n\nReleased under the [MIT](http://www.opensource.org/licenses/mit-license.php) license.\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/fredwu/jquery-inline-confirmation/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwu%2Fjquery-inline-confirmation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffredwu%2Fjquery-inline-confirmation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwu%2Fjquery-inline-confirmation/lists"}