[jQuery] Sorting spans which are in li elements.

2009-11-23 Thread javam.org
Hi there, My xhtml structure looks like: div id=aaa div class=menu span class=s1Name/span span class=s2Remaining Time/span span class=s3Status/span /div div class=values ul id =list li

Re: [jQuery] Sorting spans which are in li elements.

2009-11-23 Thread Michel Belleville
I'd select the spans bearing the same class as the clicked element, pick their parent lis and put them back in order. To select elements bearing the s1 class in an the aptly named list : $('#list .s1') To pick an element's closest li : element.closest('li') To remove an element from its current