PDA

View Full Version : text animation css problem



moscarda
09-22-2005, 03:28 PM
okay so most of us know that the text-decoration: blink; tag doesn't work in most browsers. does anyone know another way around this? there's got to be! i see some pretty sophisticated text animation scripts here on dynamic drive, and all i want to do is make some text flash between tan and orange. ideas? thanks!

Twey
09-22-2005, 05:30 PM
<p id="flashme">Hello!</p>
<script type="text/javascript">
var flashDelay = 1000; // In milliseconds

function flash(object, colour1, colour2) {
object.style.color = colour1;
setTimeout("flash2(object, colour1, colour2)", flashDelay);
}
function flash2(object, colour1, colour2) {
object.style.color = colour2;
setTimeout("flash(object, colour1, colour2)", flashDelay);
}
flash(document.getElementById("flashme"), "orange", "tan");
</script>