<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="http://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
<style type="text/css">

p {
display: none;
font-size: 25px;
}
.p2 {
display: block;
width: 400px;
margin: 0 auto;
word-break: break-all;
font-size: 25px;
}
h2 {
display: none;
font-size: 25px;
}
.h2 {
display: block;
width: 400px;
margin: 0 auto;
word-break: break-all;
font-size: 25px;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function changeText(cont1,cont2,speed){
	var Otext=cont1.text();
	var Ocontent=Otext.split("");
	var i=0;
	function show(){
		if(i<Ocontent.length)
		{		
			cont2.append(Ocontent[i]);
			i=i+1;
		};
	};
		var Otimer=setInterval(show,speed);	
};
$(document).ready(function(){
	changeText($("p"),$(".p2"),30);
	clearInterval(Otimer);
});

$(document).ready(function(){
	changeText($("h2"),$(".h2"),30);
	clearInterval(Otimer);
});
</script>
</head>

<body>


<p>This is test</p>
<p class="p2"></p>

<h2>This is test</h2>
<h2 class="p2"></h2>


</body>
</html>
// Code goes here

/* Styles go here */