Hello, when the page loads every 2 seconds, the element is updated, it is necessary that when you press the button, the update stops for 10 seconds and then starts again. Here is what it is:
var time = setInterval(function(){ live() }, 2000); function live() { $('.live-line').load('request.php').fadeIn("slow"); } function reloadTimer() { clearInterval(time); setTimeout(function(){ var time = setInterval(function(){ live() }, 2000); }, 10000); } The first time you press the button, everything works, but for subsequent presses the interval does not stop.