Yes you can here is a simple version of the feature that you've mentioned in your post
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div id="container">
This is the default text
</div>
<a href="#" id="link">Click to change</a>
<script type="text/javascript">
var a = document.getElementById('link');
a.onclick = function(){
var d = document.getElementById('container');
var def = d.childNodes[0].nodeValue;
t = 5000;
setTimeout(function(){
d.childNodes[0].nodeValue = "New Text";
setTimeout(function(){
d.childNodes[0].nodeValue = "Newer Text";
setTimeout(function(){
d.childNodes[0].nodeValue = def;
}, t);
}, t);
}, t);
}
</script>
</body>
</html>
Copy the above furnished source code and save it with an extension of either .htm or .html. After this open the HTML file in any browser and click the link 'Click to change'. After click the link it will change the content of the div element after 5 seconds then after 5 seconds it will again change the content and after 5 seconds it will change the content back to the original content.
Hope this helps.
Bookmarks