[jQuery] Re: sorting a list of elements

2009-01-16 Thread mtz
le click and make modifications. Hope this helps. > > On Jan 16, 12:44 pm,mtz wrote: > > > Thanks. > > I can make the array now and it legitimately sorts. > > However, I can't see an easy way to get the values in the array back > > into the A name > > for

[jQuery] Re: sorting a list of elements

2009-01-16 Thread mtz
;ll need to save the output into a variable, then loop through that > to create new options and replace the existing ones. > > var new_opts = $.makeArray($('#ops-memb option')).sort(... > > There's probably a neat jQuery way to do all of this compactly. > >

[jQuery] Re: sorting a list of elements

2009-01-16 Thread mtz
makeArray() first. Something like: > > >> $.makeArray($('#ops-memb option')).sort(... > > >> On Fri, Jan 16, 2009 at 11:04 AM, mtz wrote: > > >> > I have a select list into which I place new option elements, and I > >> > want to show them i

[jQuery] sorting a list of elements

2009-01-16 Thread mtz
I have a select list into which I place new option elements, and I want to show them in sorted order. I've searched around and tried some approaches, but not successful yet. Here is an example. It may not be the best use of jQuery, but at least I understand it. The select element has id ops-memb

[jQuery] Modify nested, un-ordered list

2008-10-27 Thread mtz
I have a nested, un-ordered list, representing a table-of-contents, that I want to modify. Specifically, increase or decrease the indent level of an entry. I have tried to use the family of functions append, prepend, before, after and warp, but I am not successful yet, and I hope the group can sh