Redirect to the clicked href on modal confirm
// UIkit Modal Confirm
// Redirect to the clicked href on modal confirm
UIkit.util.on('#delete-all', 'click', function (e) {
e.preventDefault();
e.target.blur();
UIkit.modal.confirm('Are you sure?').then(function () {
let thisHref = e.target.getAttribute('href');
// console.log(thisHref);
window.location.replace(thisHref);
}, function () {
// console.log('Rejected.')
});
});