Implement the sort() function in $$

I can implement the sort() function in $$?

I have to order a

  • via a date attribute.

    I get an error using sort():
    $$(".vicinoList li").sort(sort_li).appendTo(’.vicinoList’);

    Do you have ideas on how to solve it?

    Thank you!

  • There is no such method in Dom7

    No, it doesn’t exist, but I’ve solved it this way:
    list.sort(function (a, b) {
    return a.distanza - b.distanza;

    Thank you.

    I’m having the same issue, could you tell me how you got ‘list’ and append the sorted list to the ul.