[jQuery] selecting sibling nodes

[jQuery] selecting sibling nodes

<div>Hmm.... the xpath documentation for jquery uses:</div>
<div> </div>
<div> $("//div/preceding-sibling::form")</div>
<div> </div>
<div>as an example selector.  This does not seem to work for me with:</div>
<div> </div>
<div>$("//ul/preceding-sibling::li").addClass("collapse")</div>
<div> </div>
<div>I went into the source and in the $.g function there was no "preceding-sibling".  For that matter there was no "following-sibling" (which is what I actually want).  I tried adding these in myself, but am just a novice programmer, and find the jquery code to be a bit over my head.  Maybe somebody can give me an idea of what is going on :)
</div>
<div> </div>
<div>(I am just playing/learning Jquery by making expandable/collapsible menus of any <ul> with a given id.)</div>
<div> </div>
<div>Thanks for any help in advance,<br clear="all">
Jeremiah Knoche
<a href="mailto:KnocheJ@gmail.com">KnocheJ@gmail.com</a>
 </div>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/