The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

JQuery::Tabs - Have tabs to see different pages

SYNOPSIS

   my @tabs = ("tab 1","tab 2","tab 3","tab 4") ; 
   my @texts = ("line 1","line 2","line 3","line4") ; 

   my $tab = JQuery::Tabs->new(id => 'myTab',
                            tabs => \@tabs,
                            texts => \@texts,
                            addToJQuery => $jquery,
                           ) ;

   my $tab = JQuery::Tabs->new(id => 'myTab',
                               tabs => \@tabs,
                               remote => 'true', # no texts needed if remote
                               remoteProgram => '/cgi-bin/jquery_tabs_results.pl',
                               rm => 'myMode',
                               addToJQuery => $jquery,
                               spinner => 1,
                              ) ;
    my $html = $tab->HTML ;

DESCRIPTION

Allow the user to see different pages using tabs. For an example of how it looks, see http://www.stilbuero.de/jquery/tabs/.

This module sets up tabs for different pages. The HTML can be supplied directly, or the page can be updated remotely. When used remotely, the program returns the run mode parameter, rm, as well as the parameter tab, which contains the text in the tab header.

In remote mode, taconite is not used to refresh the page. All that is expected is a normal html. If you are using CGI, something like this is expected:

   use CGI ;    
   my $q = new CGI ; 
   print $q->header(-type=>'text/html');
   print $env ; 

FUNCTIONS

new

Instantiate the object

HTML

Get the HTML for the object

Parameters

id

This is the id of the tab

addToJQuery

The JQuery object to be added to.

tabs

This is a list of tab names for the headers

texts

This is a list of HTML texts needed for each tab. If the page is going to be updated remotely, this is not needed.

rm

The run mode that will be returned to the server.

spinner

When updated remotely, this add a little spinning wheel to the tab to show that it is being updated.

bookmarkable

Allow the back button in the browser to give the expected results.

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:

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.