2
How do I alternate text with a set time on a div? I don’t know command in jQuery, I tried the code below but it doesn’t work.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="frases"></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('#frases').toggle
function(){
$('#frases').text("texto 1");
$(this).show(5000);
},
function(){
$('#frases').text("texto 2");
$(this).show(5000);
},
function(){
$('#frases').text("texto 3");
$(this).show(5000);
}
});
});
</script>
</body>
</html>
If anyone can help, thank you.
Why doesn’t it work? The text should repeat itself indefinitely?
– Marciano.Andrade