A simple way to do this is like this:
<div id="el">
<h1>TEXTO DE EXEMPLO 1</h1>
<h1>TEXTO DE EXEMPLO 2</h1>
<h1>TEXTO DE EXEMPLO 3</h1>
</div>
Script:
(function(){
var el = document.getElementById('el'),
total = el.children.length, t = 1000, count=0;
setInterval(function() {
for (var j=0; j < total; j++) {
el.children[j].removeAttribute("class");
}
el.children[count].setAttribute("class", "active");
count++;
if (count == total) {
count=0;
}
}, t);
})();
to break in last:
(function(){
var el = document.getElementById('el'), total = el.children.length, t = 1000, count=0;
var interval = setInterval(function() {
for (var j=0; j < total; j++) {
el.children[j].removeAttribute("class");
}
el.children[count].setAttribute("class", "active");
count++;
if (count == total) {
clearInterval(interval);
}
}, t);
})();
Css:
#el h1 {
display:none;
}
#el h1.active {
display:block;
}
Continuous example in jsfiddle.
Example interrupted in jsfiddle.