I need to update a div constantly and however this code below only updates once, I would like instructions how to do it always update to a certain time so that the same action be repeated countless times.
<!DOCTYPE html>
<html>
<head>
<title>Refresh sem atualizar página</title>
<meta charset="utf-8">
<script src="jquery.js" type="text/javascript"></script>
<body>
<div id="panel">teste</div>
<input id="changePanel" value="Change Panel" type="hidden">
<script>
$("#changePanel").click(function() {
var data = "testando";
$("#panel").hide().html(data).fadeIn('fast');
});
window.setTimeout(function(){
document.getElementById("changePanel").click();
}, 2000);
</script>
</body>
</html>