Modify ↓
Ticket #288 (closed feature: worksforme)
Expressions: sorting
| Reported by: | t22@… | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | core | Version: | |
| Keywords: | sort expressions | Cc: | |
| Blocking: | Blocked by: |
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).
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

The new .sort method discussed on the mailing lists could do this, you just need to provide a custom function to sort by id.