YUI recommends YUI3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

This documentation is no longer maintained.

Yahoo! UI Library

DataTable Widget  2.9.0

Yahoo! UI Library > datatable > YAHOO.util.Sort

static Class YAHOO.util.Sort

Sort static utility to support Column sorting.



Boolean compare ( a , b , desc )
Comparator function for simple case-insensitive string sorting.
a <Object> First sort argument.
b <Object> Second sort argument.
desc <Boolean> True if sort direction is descending, false if sort direction is ascending.
Returns: Boolean
Return -1 when a < b. Return 0 when a = b. Return 1 when a > b.

Copyright © 2011 Yahoo! Inc. All rights reserved.