There was such a problem, the function makes a check every second, but if an exception occurs in the PHP-коде , I need to suspend setInterval for 60 seconds and then restore its check every second. How can this be implemented?
function show() { $.ajax({ url: "test.php", cache: false, success: function(data) { $("#content").html(data); } }); } $(document).ready(function() { setInterval('show()', 1000); });