GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  JQUERY::TABLESORTER (3)

.ds Aq ’

NAME

JQuery::TableSorter - The JQuery TableSorter

CONTENTS

SYNOPSIS



    use JQuery ;
    use JQuery::TableSorter ;

    # define JQuery
    my $jquery = new JQuery ;


    # Create data for the table
    my $data = [[Id,Total,Ip,Time,US Short Date,US Long Date],
                [66672,  $22.79,172.78.200.124,08:02,12-24-2000,Jul 6, 2006 8:14 AM],
                [66672,$2482.79,172.78.200.124,15:10,12-12-2001,Jan 6, 2006 8:14 AM],
                [66672,  $22.79,172.78.200.124,08:02,12-24-2000,Jul 6, 2006 8:14 AM],
                [66672,$2482.79,172.78.200.124,15:10,12-12-2001,Jan 6, 2006 8:14 AM]
               ] ;

    $jquery->add_css(new JQuery::CSS( hash => {
                                         #table1 => {width => 900px, font-size => 15px}
                                        })) ;

    # Create a TableSorter, add it to JQuery, and get the result as HTML
    my $tableHTML = JQuery::TableSorter->new(id => table1,
                                             addToJQuery => $jquery,
                                             data => $data,
                                             dateFormat=>dd/mm/yyyy,
                                             sortColumn => Total,
                                             sortClassAsc => headerSortUp,
                                             sortClassDesc => headerSortDown,
                                             headerClass => header,
                                             stripingRowClass =>  [even,odd],
                                             stripRowsOnStartUp => true,
                                             #highlightClass => highlight,
                                             disableHeader => true
                                             ))->HTML ;
    # Get the JQuery code
    my $code = $jquery->get_jquery_code ;

    # Get the CSS
    my $css = $jquery->get_css ; 

    # All that needs to be done is to place the html, jquery code and css in a template



DESCRIPTION

This module defines a table which is sorted when the user clicks the header. There are two builtin styles, to use them you have to set:



    headerClass => header,
    sortClassAsc => headerSortUp,
    sortClassDesc => headerSortDown,



or



    headerClass => headerSimple,
    sortClassAsc => headerSimpleSortUp,
    sortClassDesc => headerSimpleSortDown,



To see them, run the jquery_tablesorter1.pl and jquery_tablesorter2.pl examples.

In any event, you can always add CSS afterwards to change the appearance.

This module is based on the JQuery TableSorter. Definitive information for TableSorter can be found at <http://motherrussia.polyester.se/jquery-plugins/tablesorter/>. Examples can be found at <http://motherrussia.polyester.se/pub/jquery/tablesorter/1.0.3/docs/>.

PARAMETERS These are the parameters that new can take.

id id - css id - mandatory
data data - a double array containing the data - mandatory
headerClass headerClass - the name of the css class defining the header
dateFormat dateFormat - format to display the date ’dd/mm/yyyy’
sortColumn sortColumn - String of the name of the column to sort by.
sortClassAsc sortClassAsc - headerSortUp - Class name for ascending sorting action to header
sortClassDesc sortClassDesc - headerSortDown - Class name for descending sorting action to header
headerClass headerClass -header Class name for headers (th’s)
highlightClass highlightClass - highlight - class name for sort column highlighting.
headerClass headerClass - header Class name for headers (th’s)=back
stripingRowClass stripingRowClass - class
disableHeader disableHeader - true/false

FUNCTIONS

HTML Get the HTML text for the object
new Instantiate the object

AUTHOR

Peter Gordon, <peter at pg-consultants.com>

BUGS

Please report any bugs or feature requests to bug-jquery-taconite at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=JQuery>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.



    perldoc JQuery



You can also look for information at:
o AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/JQuery>

o CPAN Ratings

<http://cpanratings.perl.org/d/JQuery>

o RT: CPAN’s request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=JQuery>

o Search CPAN

<http://search.cpan.org/dist/JQuery>

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2007 Peter Gordon, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 JQUERY::TABLESORTER (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.