I have a list that looks like this:
<li class = "current_parent level-0">
<a> Parent Link </a>
<ul class= "children">
<li class = "level-1">
<a> Link to child </a>
</li>
<li class = "level-1 current_page_item">
<a> Link to child </a>
</li>
<li class = "level-1">
<a> Link to child </a>
</li>
</ul>
</li>
Basically, I want to get the HREF of the element one level UP and one level DOWN from the current_page_item .
I can get the URL of the current_page_item > a easily enough via .attr(), i.e. $('.current_page_item').attr("href");.
But how can I tell jQuery to look one level up? .parent() doesn't seem right, because they're not parents, they're siblings,right?
But how can I tell siblings to move UP or DOWN a list?
Basically I want $('.current_page_item > ONE LI > A UP').attr("href"); and $('.current_page_item > ONE LI > A DOWN').attr("href");.
Again, thanks for the help on my jQuery n00bquest!