table sort (revisited) demo

tabella #1

La seguente tabella di 100 righe è inizializzata “sortable-onload-3” che oridina per la colonna “Distributor”.

Release Date Movie Distributor Budget US Gross Worldwide Gross My (Fake) Rating
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1
06/30/2004 Spider-Man 2 Columbia $200,000,000 $373,524,485 $783,524,485 10
12/19/1997 Titanic 20th Century Fox $200,000,000 $600,788,188 $1,835,400,000 9.2
06/30/1999 Wild Wild West Warner Bros. $175,000,000 $113,805,681 $217,700,000 2.5
07/28/1995 Waterworld Universal $175,000,000 $88,246,220 $255,200,000 3.8
05/07/2004 Van Helsing Universal $170,000,000 $120,150,546 $269,150,546 3.7
07/01/2003 Terminator 3: Rise of the Machines Warner Bros. $170,000,000 $150,358,296 $433,058,296 2.2
11/10/2004 Polar Express, The Warner Bros. $170,000,000 $162,753,127 $281,351,972 6.6
11/24/2004 Alexander Warner Bros. $155,000,000 $34,297,191 $164,297,191 0
06/15/2005 Batman Begins Warner Bros. $150,000,000 $205,343,774 $371,824,647 4.9
07/15/2005 Charlie and the Chocolate Factory Warner Bros. $150,000,000 $206,278,008 $467,278,008 8.1

tabella #2: funzione personalizzata

L'ultima colonna “Screening time” utilizza una funzione personalizzata per il riordino. Questa è stata realizzata aggiungendo “sortable-funzionepersonalizzata ” al tag (TH). In questo caso è stata aggiunta la classe “sortable-sortByTwelveHourTimestamp” che dice allo script di utilizzare la funzione “sortByTwelveHourTimestamp

Movie Screening time
Spider-Man 2 4:32am
Titanic 5:56am
Wild Wild West 7:34 pm
Waterworld 9:58pm
Van Helsing 12:00pm
Terminator 3: Rise of the Machines 12:10 p.m
Polar Express, The 2:00pm
Alexander Unknown
Batman Begins Unknown
Charlie and the Chocolate Factory 7:24am
Troy 6:32am
Tarzan Unknown
Die Another Day 1:22am
Armageddon 5:57pm
Men in Black 2 9:46pm
Lethal Weapon 4 9:56p.m.
Spider-Man 4.32A.M.
Stealth 12.32a.m
A tfoot that should not change qwerty

Qui c'è il post relativo oppure scarica il sorgente.