This is jquery plugin written by Berka Ayowa that helps to in force confirmation on click of html element.
To use it you just have to include jQuery and a copy of popup_confirmation plugin in your head or footer:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script src="../confirmation.js"></script>
Attribute | Description |
---|---|
confirmation-title | Title to be displayed on pop up confirmation header. |
confirmation-message | Mesage to be diplay on pop up confirmation body. |
Event | Parameters | Description |
---|---|---|
onClick | id , Event | Fires when pop up confirmation button is click |
<p>Click <a href="https://www.facebook.com/" class="confirmation" confirmation-title='Confirmation' confirmation-message='Do you want to go to facebook ?'>Here</a> to go to facebook</p>
$('.confirmation').confirmation({
onClick: function(id, event) {
//
}
});
$('.confirmation').confirmation({
onClick: function(id, event) {
$('#result').text('Your pressed : ' + id);
}
});
$('.confirmation').confirmation({
onClick: function(id, event) {
if(id == 'yes') {
window.location = event.target.href
}
}
});