<body onload="myfunction('target')"><div id="target"> "Hey there!" </div></body>
Can we replace the text "Hey there!" with another HTML element or div? This is currently a left-to-right marquee text.
<script language="javascript">
function myfunction(id) {
var element = document.getElementById(id);
var textnode = element.childNodes[0];
var text = textnode.data;
setInterval(function() {
text = text[text.length - 1] + text.substring(0, text.length - 1);
textnode.data = text;
}, 400)
}
</script>