javascript blink document title code example
Example: javascript make title blink
var isOldTitle = true;
var oldTitle = "oldTitle";
var newTitle = "newTitle";
var interval = null;
function changeTitle() {
document.title = isOldTitle ? oldTitle : newTitle;
isOldTitle = !isOldTitle;
}
interval = setInterval(changeTitle, 700);
$(window).focus(function () {
clearInterval(interval);
$("title").text(oldTitle);
});