подскажите плиз, как в jQuery получить текст "Hotels"
<span class="dlposts-found__current-page-label"><i>·</i>Hotels</span>
если я делаю так:
jQuery( ".dlposts-found__current-page-label" ).text();
то получаю: ·Hotels·Hotels
а если так:
jQuery( ".dlposts-found__current-page-label" ).html();
<i>·</i>Hotels
`<strong>
<span class="dlposts-found__of">30</span>
<span class="dlposts-found__number-separator">of</span>
<span class="dlposts-found__number">530</span>
<span class="dlposts-found__label">results</span>
<span class="dlposts-found__current-page-label"><i>·</i>Hotels</span>
</strong>`
var label = jQuery( ".dlposts-found__current-page-label" ).text();
console.log( label.replace('·', '') );
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span class="dlposts-found__current-page-label"><i>·</i>Hotels</span>
var $clone = $(".dlposts-found__current-page-label").clone();
$clone.children().remove();
console.log($clone.text());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span class="dlposts-found__current-page-label"><i>·</i>Hotels</span>
Апостиль в Лос-Анджелесе без лишних нервов и бумажной волокиты
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости