jQuery Simple Example
HTML
<script src="//www.addressfinder.co.nz/assets/v2/widget.js"></script>
<button class='delete_current_form'>Delete</button>
CSS
body {
padding: 5px;
}
label {
font-weight: bold;
}
input[type=text] {
width: 20em
}
p {
margin: 1em 0 0;
}
JavaScript
$(document).ready(function() {
$('.delete_current_form').on('click', function() {
if(confirm("{{ 'Post will be deleted! Continue?'|trans }}") ){
alert("Ok clicked");
// Do whatever you want to do when OK clicked
}
else{
alert("Cancle clicked");
// Do whatever you want to do when OK clicked
}
});
});