setTimeout doesn't work with window.location?
- by Syom
i try to rich flash like effect when changing window location, but there is a small problem, i can't solve.
look at the script please
$(document).ready(function(){
$('a.flash').click(function(e) {
e.preventDefault();
$('body').fadeOut(1500);
setTimeout("", 1500);
window.location=this.href;
});
});
window.location=this.href must be done after 1500ms, but it doesn't happen.
could you explain why?
what is strange, when i try to write alert("something"); instead of window.location=this.href, it works fine. Could you explain why?
Thanks