<div field="timer1" >00 : 24 : 00 : 00</div>
$( document ).ready(function() {
if ($('[field="timer1"]').text(00 : 00 : 00 : 00))
{
тут скрипт
}
});
$( document ).ready(function() {
if ($('[field="timer1"]').text(00 : 00 : 00 : 00))
{
var block = $('#block1');
block.find("[href='#1']").attr("href", "#2");
}
});
let timer = $('div[field="timer1"]');
let timeout = 800;
let block = $('#block1');
function checkTimer(){
if ( '00 : 00 : 00 : 00' == timer.text() ) {
block.find("[href='#1']").attr("href", "#2");
}else{
setTimeout(checkTimer, timeout);
}
}
$( document ).ready(function(){
setTimeout(checkTimer, timeout);
});