Something like this? var sorted = $.makeArray($('ul li')).sort(function(a,b){ return $(a).text() > $(b).text(); }); $('ul').html(sorted);
On Apr 24, 9:16 am, hollow <engstrom.rag...@gmail.com> wrote: > Hi as the title says i'm looking to order a list taht is created by > drag and drop. > > the structure is a normal unordered list > > <ul> > <li>C item</li> > <li>E item</li> > <li>D item</li> > <li>F item</li> > <li>F item</li> > <li>A item</li> > </ul> > > Can someone help me with that please. > > Have looked at sort , sortable , etc... > But no real explanation found. > > Regards