I know in jQuery 1.4.x there is a method delay(). We can use it like this:
$('#block').slideUp().delay(2000).slideDown();
and it works great. But i want to modify document.title, but this construction doesnt work:
$('title').html('New title 1').delay(2000).html('New title 2');
when you run this code title will be New title 2 avoid any delay. How to fix it?
Use a callback with setTimeout:
$.fn.delayputs a delay in the animation queue. It does not delay the running script.