Hi,
I want to use html link to close sweet alert 2 modal alert. it is possible?
I have something like this
swal({
title: 'Product added to cart!',
html: 'I want more Checkout ',
timer: 10000,
showConfirmButton: false
});
So when someone click into I want more button the modal should close. Thanks in advance!
Sure it is :)
swal({
title: 'Product added to cart!',
html: '<a href="#" onclick="swal.closeModal(); return false;">I want more Checkout</a>',
timer: 10000,
showConfirmButton: false
});
Super fast answer! Super thanks!
BTW. SWAL2 is fare more better than SWAL... I can use smarty strings inside declaration too!
{l s='Some text'} or variables like {$product->name|escape:'htmlall':'UTF-8'}
Superb!
Glad it works for your projects! :+1:
Most helpful comment
Sure it is :)