I want to stop this interval in the error handler from restarting. Is it possible, and if so, how?
$(document).on('ready',function(){ setInterval(updateDiv,3000); }); function updateDiv(){ $.ajax({ url: 'getContent.php', success: function(data){ $('.square').html(data); }, error: function(){ $.playSound('oneday.wav'); $('.square').html('<span style="color:red">Connection problems</span>');
javascript jquery html setinterval
Henrik Petterson May 08 '13 at 9:31 a.m. 2013-05-08 09:31
source share