1
I am needing to update a div constantly and however this code below only updates once, I would like instructions on how to update it always at a certain time so that the same action is repeated numerous 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>
That one
data
comes from where? if it is new data that you search via server that should be done in another way.– Sergio