jQuery find next and prev element
- by StoneHeart
I try to find a next or prev element of current element. But next() and prev() function can only work in a scope, it can not reach outside. For an example this is what I want to achieve:
<ul id="ul1">
<li>1</li>
<li>2</li>
<li>3</li>
<li>
<ul id="ul2">
<li>4</li>
…