SweetAlert2
Time Issue Resolved
HTML
<script src=" https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/sweetalert2/0.4.3/sweetalert2.css">
<div>
<button>Sweet Alert Timer Test. Try me!</button>
</div>
CSS
div {
margin:50px;
}
button {
padding:15px; font-size: 14px;
}
JavaScript
$('button').on('click', function() {
swal({
title: 'Timer Test',
text: 'This window has a 2s timer.',
confirmButtonText: 'Submit',
closeOnConfirm: false,
allowOutsideClick: false,
timer: 2000
},
function() {
swal({
title: 'Second Window!',
text: 'This window has no timer set'
});
});
});
//###############SweetAlert2.min.js######################
!function(e,t){"use strict";function n(){function n(e,t){for(var n=0;n<x.length;n++)if(e+=t,e===x.length?e=0:-1===e&&(e=x.length-1),x[e].offsetWidth||x[e].offsetHeight||x[e].getClientRects().length)return void x[e].focus()}function s(t){var o=t||e.event,l=o.keyCode||o.which,a=C(m,"visible");if(-1!==[9,13,32,27].indexOf(l)){for(var i=o.target||o.srcElement,r=-1,s=0;s<x.length;s++)if(i===x[s]){r=s;break}if(9===l){if(!a)return;o.shiftKey?n(r,-1):n(r,1),A(o)}else 13===l||32===l?-1===r&&H(k,o):27===l&&u.allowEscapeKey===!0&&H(B,o)}}if(void 0===arguments[0])return e.console.error("sweetAlert expects at least 1 attribute!"),!1;var u=a({},b);switch(typeof arguments[0]){case"string":u.title=arguments[0],u.text=arguments[1]||"",u.type=arguments[2]||"";break;case"object":u.title=arguments[0].title||b.title,u.text=arguments[0].text||b.text,u.html=arguments[0].html||b.html,u.type=arguments[0].type||b.type,u.animation=void 0!==arguments[0].animation?arguments[0].animation:b.animation,u.customClass=arguments[0].customClass||u.customClass,u.allowOutsideClick=void 0!==arguments[0].allowOutsideClick?arguments[0].allowOutsideClick:b.allowOutsideClick,u.allowEscapeKey=void 0!==arguments[0].allowEscapeKey?arguments[0].allowEscapeKey:b.allowEscapeKey,u.showConfirmButton=void 0!==arguments[0].showConfirmButton?arguments[0].showConfirmButton:b.showConfirmButton,u.showCancelButton=void...