PopConfirm
A simple action confirmation plugin for jQuery based on Twitter Bootstrap Popover
Install / Use
/learn @IfnotFr/PopConfirmREADME
popconfirm
Compatible Bootstrap 2.3 and Bootstrap 3
A simple action confirmation plugin for jQuery based on Twitter Bootstrap Popover
Example
Please, check our simple example here : http://jsfiddle.net/RDh7E/28/
How to use
1: Add the jquery.popconfirm.js file into your Twitter Bootstrap document including jQuery.
<script type="text/javascript" src="js/jquery.popconfirm.js"></script>
2: Use the jQuery method popConfirm() on any object you want with handle click events :
<a href="mypage.html" id="link">link</a>
$("#link").popConfirm();
<button class="btn btn-success" data-toggle='confirmation' id="button">button</button>
$('#button').click(function() {
alert('You clicked, and valided this button !');
});
$("#button").popConfirm();
Full options usage
$("[data-toggle='confirmation']").popConfirm({
title: "Really ?", // The title of the confirm
content: "I have warned you !", // The message of the confirm
placement: "bottom", // The placement of the confirm (Top, Right, Bottom, Left)
container: "body", // The html container
yesBtn: "Yeah",
noBtn: "Oh no !!!"
});
You can also pass parameters using the html attribute : data-confirm-* (replace * by the option name).
Example :
<a href="destination.html" data-confirm-title="My Super Title" data-confirm-content="My Super Question">Link</a>
What it handles
- jQuery
.click()and.bind('click')methods - Hard coded
onclickattributes hrefattribute from aalik- Submit a form from a
type="submit"button/input
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
