Toggle title of a page

0

I would like to switch the title of a page, just like it appears in facebook messenger when someone sends a message. The problem is that my code does not stay there too regular can anyone help me?

Code

    setInterval(function(){document.title = '('+ data +') Tickets'; }, 1000);
    setInterval(function(){document.title = 'Tem '+ data +' Tickets'; }, 1500);
    
asked by anonymous 15.03.2017 / 14:08

0 answers