Hi,
I have a problem with setInterval (jquery). It works great, but I wan't the element to stop refreshing when a textarea is selected (so that users can insert text).
Here is the refresh code I'm using currently.
$(document).ready(function() {
$("#container").load("php/functions.php?page=wall");
refreshId = setInterval(function() {
$("#container").load("php/functions.php?page=wall&r="+Math.random());
}, 1000);
});
How could I alter this, for example, to make the interval stop whilst the the text area is in focus/being typed in? At the moment, I've had to make the textarea change the URL onclick - which is very unstable.
Many Thanks