I use blockUI and its work is very good.
The only thing I can't seem to do is redirect to another URL after x seconds. I can make it redirect, but it does not take into account setTimeout ...
Could anyone do this?
<script type="text/javascript">
$(document).ready(function() {
$('#demo2').click(function() {
$.blockUI({ css: {
border: 'none',
padding: '15px',
color: '#fff',
backgroundColor: '#54bdd9',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: 1.5,
color: '#fff'
} });
setTimeout($.unblockUI, 6000),$(window.location).attr('href', 'http://www.mydomain.co.uk');
});
});
</script>
If anyone can shed light, that would be great.
Thank.
source
share