Navigate into elements with JQuery
-
15-07-2021 - |
Pergunta
I have this elements hierarchy :
<div>
<div>
<input id="abc" .../>
</div>
<div>
<span />
</div>
</div>
How can I access to span element via input whom I know id please ?
I think I have to use
$("#abc").parent().parent()...
...but after please ?
Thank you
Solução
Outras dicas
$("#abc").parent().next().children('span')
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow