Side navigation
#288 closed feature (worksforme)
Opened October 19, 2006 01:07PM UTC
Closed November 15, 2006 04:01PM UTC
Last modified June 19, 2007 07:46AM UTC
Expressions: sorting
Reported by: | t22@users.sourceforg | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | core | Version: | |
Keywords: | sort expressions | Cc: | |
Blocked by: | Blocking: |
Description
I'd like to see jQuery Expressions with sorting support. XPath can't sort a resultset, so it has to be a custom expression. Something like:
p_array = $("p/sort(@id)").get()
to put all P elements in an array, sorted by their id (so actually, you should also specify whether to sort alphabetically or numerical etc).
The new .sort method discussed on the mailing lists could do this, you just need to provide a custom function to sort by id.