YUI recommends YUI 3.

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

Progressive Enhancement

This example creates a DataTable instance based on markup that already exists on the page. By progressively enhancing markup with higher order functionality, users who do not have JavaScript enabled are still able to view the page's content and experience core functionality.

In this example's code, note that we listen for the window "load" event before calling our function to be sure that the original table markup is fully rendered and available as a DataSource source for our DataTable instance.

Example: Progressively Enhanced Table from Markup
01/23/1999
12
$150.00
05/19/1999
8
$60.00
08/09/1999
1
$34.99
01/23/2000
10
$1.00
04/28/2000
123
$33.32
01/23/2001
5
$15.00
09/30/2001
14
$56.78