Comments (9)
Interesting behaviour proposal.
Guys, please +1 this feature if you are interested.
from popconfirm.
Hi there... I currently have this:
<a class="trash-key"
href="#"
data-post-url="...some url ... "
data-confirm-title="Are you sure?"
data-confirm-content="About to delete key <strong>{{$key}}</strong> from database."
data-confirm-placement="top"
data-confirm-container="body"
data-confirm-yesBtn="Ok, delete!"
data-confirm-noBtn="No"
> <i class="fa fa-trash fa-lg" aria-hidden="true"></i>
</a>
$('a.trash-key').click(function (e){
var row = $(this).closest('tr');
var url = $(this).data('post-url');
var id = row.attr('id');
$.post( url, {id: id}, function(){
row.remove();
} );
return false;
});
$("a.trash-key").popConfirm();
The javascript is executed ONLY if I click the yesBtn.
from popconfirm.
@RamonZayas this behaviour is normal, this it the main goal of the plugin : to queue an action of a button and execute it with a confirmation on the YES button.
from popconfirm.
I know, but that is exactly what @ivanoronee is asking for... am I right?... or is this something completely different? what am I missing?.
from popconfirm.
I thinks it is different.
Can you explain your case with more precision ?
from popconfirm.
Isn't this solved with #33?
Maybe it's just a matter of documentation. It isn´t clear that when you click the 'Yes' button, the original click handler is called
from popconfirm.
This plugin is an "Simple action confirmation plugin".
So, it ask a confirmation before doing an action, and do the action only if we click yes.
@EnekoGB : do you think the "action confirmation" is too ambigous ? Should i add a example ? (like a confirm() in javascript ?)
from popconfirm.
@ifnot When i read the doc the first time, it wasn't clear to me, maybe because i had used @tavicu bs-confirmation, which has an onConfirm callback.
I realized how this plugin works only when I checked the fiddle demo.
Maybe a little change in README.md like #34 whould make it clearer.
from popconfirm.
I have merged the example.
I need some docs update as the action can be manual.
I will work on it when i have the time :)
from popconfirm.
Related Issues (20)
- How to combine confirm and ajax HOT 3
- popConfirm on newly created elements HOT 2
- Not working with on("click", ... ) handlers HOT 3
- Slight modification because my click event delete the popConfirm tag HOT 1
- Styling of buttons HOT 3
- PopConfirm not work on AJAX loaded HTML elements HOT 1
- removeAttr('onclick') not working in IE HOT 1
- Button name/value not included in submitted form HOT 2
- No bower package HOT 2
- Double Click Problem HOT 1
- Example on http://jsfiddle.net/RDh7E/28/ not working HOT 4
- How can I popup the box conditionally? HOT 1
- Title option should override title attribute
- Allow destroying the popover HOT 4
- onclick event undefined HOT 4
- problem with <th:each> when dynamically generating a table with thymeleaf HOT 5
- Use Angular translate Text in options.
- PopConfirm doesn't work with Bootstrap 4 and jQuery 3.3.1 HOT 11
- AJAX request inside of binded click event - adds one extra after each click HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from popconfirm.