I have this script that you can see page changes in real time. So everything works great but for some reason when I try to copy the text the text become unhighlighted a second later.
I have to try to copy the text really fast before the setinterval updates the page again for new changes so my question is, is there a way were I can see constant changes on x.php
at the same time be able to copy text in any pace with out the interruption of the set interval updating the page constantly for new page changes?
Here is my code
index.php
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
function changes(){
$('.x').load('x.php');
}
setInterval(function(){changes()},1000);
});
</script>
<body onload='changes()'>
<div class='x'></div>
</body>
x.php
<p>Random text</p>
or