I have the following structure of a menu:
<ul id="responsiveAccordion" class="showedmenu">
<li><a title="Página Inicial" href="/">Página Inicial</a></li>
<li id="category_item_1">
<div class="responsiveInykator"><span>Teste </span><i class="fa fa-angle-down fa-2" aria-hidden="true"></i></div>
<a href="/">Início</a>
<ul style="display: block;">
<li><a title="Categoria 1" href="/categoria-1">Categoria 1</a></li>
<li><a title="Categoria 2" href="/categoria-1">Categoria 2</a></li>
</ul>
</div>
</li>
</ul>
...
In my code, when I console below:
console.log($('#responsiveAccordion > li .responsiveInykator').parent().children()[1]);
It shows me:
<a href="/">Início</a>
I would like to capture the link text: "Start"
I tried this but it gave error:
console.log($('#responsiveAccordion > li .responsiveInykator')
.parent()
.children()[1].text());