The fact is that in .gTable there are a lot of .forum classes and when I display it like this:
var forum_name = $(this).find('.forum').text()+'|'; then it turns out that all classes merge into one and at the very end is |. Screenshot -

Questions about Vkontakte and Discussion of programs and services look like this:
<div class="forum"> Вопросы о ВКонтакте </div> <div class="forum"> Обсуждение программ и сервисов </div> In fact, should be displayed as:
Questions about VK | Discussion of programs and services |
My govnokod did not cope with this, help, please do the right thing:
$('.gTable:last').hide(); $('.gTable').each(function() { var cat_name = $(this).find('.gTableTop').text(); var forum_name = $(this).find('.forum').text()+'|'; $(this).html('\ <div class="forum_cat_name">'+cat_name+'</div>\ <div class="forum_themes_content">\ '+forum_name+'\ </div>\ '); });