I am using jQuery. I have HTML code which looks like this:
<ul>
<li>123</li>
<li id="hello">456</li>
</ul>
<ul>
<li>789</li>
</ul>
I want, with jQuery, to get the li element after #hello (the 789 element). I tried with $('#hello').next(), it does not work.
How do I do?
the
parent()[docs] method to go up to the<ul>elementthe
next()[docs] method to go to the next<ul>elementthe
children()[docs] method to get the nested<li>element