$(function() {
$.get("/test.html", function(data) {
var content = $("body", data).html();
$("#id").html(content);
if(content == undefined) {
$("#id").html(`<div class="text">Где-то проблема, мы над этим работаем!</div>`);
console.log(content)
}
});
});
<div class="theme">
<span class="nick">Админ</span>
<a href="/news?act=view_messages&topic_id=26843&a=1638887051">Новая новость</a>
(1) [<a href="news?act=mod&subact=del_topic&section_id=67981&topic_id=26843">удл</a>][<a href="news?act=mod&subact=edit_topic&&section_id=67981&topic_id=26843">ред</a>][<a href="news?act=mod&subact=move_topic&&section_id=67981&topic_id=26843">пер</a>]
</div>