So, i need to have a blinking title, this code should work, but for some reason it doesn’t.
Now console keeps showing me correct title, but title in my browsers doesn’t change, what could be wrong?
var blink = true;
setInterval(function(){
if(blink){
$("title").text("test");
blink = false;
console.log($("title"));
}else{
$("title").text("");
blink = true;
console.log($("title"));
}
}, 1000);
Use
document.title = ...<—You are just editing an attribute which does nothing.
Try this:
See the title in this demo change from
testtononeevery second. (full fiddle)