settimeout - Updating content of a div using jquery -
i have code
<script> function update() { $.get("note.php?load=true", function(data) { $("#note").html(data); window.settimeout(update, 3000); }); } </script> <div id="note"><?php include("note.php?load=true"); ?></div>
where "note.php?load=true" url have content i'd display in div "#note" updating every 3 seconds. when load code, can see content of note.php?load=true because i've included via php show on page load, doesn't update. tell me why?
it won't update until update function called. try putting window.settimeout(update, 3000); somewhere more global scope update function gets called.
Comments
Post a Comment