After I leave this loaded for some time, the fading in and out becomes about 3 times quicker than it is intended for (at the beginning it works correctly). Any help and maybe explanation what have I done wrong? Thank you.
<html>
<head>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>
$(document).ready(function(){
var x =-1
function setWord(){
function come(){
$(".fde").fadeIn(200);
}
come();
function fade(){
$(".fde").fadeOut(200);
}
setTimeout(fade, 2800);
var phrases =new Array("War is peace","Freedom is slavery","Ignorance is strength");
if (x == phrases.length-1){x = -1}
x += 1;
$(".test").text(phrases[x]);
}
setTimeout(setWord,0);
setInterval(setWord, 3000);
});
</script>
</head>
<body>
<p class="fde"><span class='test'></span></p>
</body>
</html>