bootstrap modal popup automatically timeout close
<script>
$(document).ready(function () {
$('.face').click(function () {
$('#myModal').modal('show', function () {
clearTimeout(myModalTimeout);
});
myModalTimeout = setTimeout(function () {
$('#myModal').modal('hide');
}, 1000);
});
});
</script>
<script>
$(document).ready(function () {
$('.face').click(function () {
$('#myModal').modal('show', function () {
clearTimeout(myModalTimeout);
});
myModalTimeout = setTimeout(function () {
$('#myModal').modal('hide');
}, 1000);
});
});
</script>
No comments:
Post a Comment