It would be nice to have a listener to a certain class to create confirmable link:
for example:
<script type="text/javascript">
$('.bootstrap-alert-confirmable').click(function(event){
var message = $(this).data('message');
var dest = event.target.href;
event.preventDefault();
$.alert({
text_confirm: 'oui',
text_decline: "annuler",
click_outside_for_close: false,
title: 'Êtes-vous sûr(e) ?',
body: message + '<br>Êtes-vous sûr(e) ?',
callback_confirm: function(){
window.location = dest;
},
is_delayed: false,
});
});
</script>
<a class="btn btn-danger bootstrap-alert-confirmable" data-message="This will cancel things." href=scheme://path/to/final/link">Cancel</a>
It would be nice to have a listener to a certain class to create confirmable link:
for example:
and in the page (DOM)