jquery「Fade Effect」を使用して、3秒ごとにapのテキストを変更したい:
<p class="first">Conected</p>
に
<p class="second">2547</p>
setInterval https://developer.mozilla.org/en-US/docs/DOM/window.setIntervalを使用できます
setInterval(function() {
$('p').fadeOut(500, function() {
var $this = $(this);
$this.text($this.text() == 'Connected' ? '2457' : 'Connected');
$this.toggleClass('first second');
$this.fadeIn(500);
});
}, 3000);
setInterval または待機
setInterval http://www.w3schools.com/js/js_timing.asp
JQuery 待機 http://api.jquery.com/delay/