Tell me how to implement the update of the <div> block. I found the usual update without rebooting the block, but now the question is when text is selected in the block where any text (updateable) text selection disappears, as the block is not in place but is updated. But there are many sites where there is an update of the block without reloading the page and when selecting this block, any text in it, the selection does not disappear. How it's done ?
My code is:
<div id="content"></div> function show() { $.ajax({ url: "time.php", cache: false, success: function(html){ $("#content").html(html); } }); } $(document).ready(function(){ show(); setInterval('show()',1000); });