I have the following code:
function hvcm_wait() {
waitingDialog.show('Please wait while your VM is rebooting...');
}
$('#hv_ConfirmShutDown').on('show.bs.modal', function(e) {
$(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a class="btn btn-danger btn-ok">Shutdown Now</a>
How do I call the javascript function hvcm_wait() when .btn-ok is clicked is clicked in Modal?
Any help would be highly apperciated. Thanks!