The task is to check if the div is empty? The content in the div is loaded via ajax, as well as a script that, under certain conditions, displays an audible alert. Actually, I can’t figure out how to prevent the script from triggering an alert when there is content in the div. Tried to do through this design:
if($(".grid_call_main_orders_one_content").is(':empty')){ var audio = new Audio(); audio.src = 'alert.mp3'; audio.autoplay = true; setTimeout(function () { alert('Новый заказ!Обновите страницу! '); }, 3000); } But the scheme is not working.