Try this bit of code that was posted by someone else a while back: jQuery.fn.sort = function() { return this.pushStack( jQuery.makeArray( [].sort.apply( this, arguments ) ) ); };
You can then do something like: jqueryObject.sort( function( a, b ) { return a - b; }); Karl Rudd On Jan 15, 2008 7:19 AM, monster79 <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm looking for an elegant method to sort elements returned from > find() or an each() callback. Currently I'm dumping the elements' text > into a Javascript array with push(), then sorting the array > with .sort() and printing the results with a for() loop. This works > well, but it doesn't seem like the jQuery way to do it. Any > suggestions? > Jonas >