CGI::Toggle(3pm) | User Contributed Perl Documentation | CGI::Toggle(3pm) |
CGI::Toggle -- Utility methods for collapsible sections
use CGI ':standard'; use CGI::Toggle
print header(),
start_html('Toggle Test'),
h1("Toggle Test"),
toggle_section({on=>1},p('This section is on by default'),
toggle_section({on=>0},p('This section is off by default'),
toggle_section({plus_img=>'/icons/open.png',
minus_img=>'/icons/close.png'},
p('This section has custom open and close icons.')),
hr,
end_html;
This package adds JavaScript-based support for collapsible sections by adding a single new function toggle_section().
It overrides the CGI start_html() method, so CGI must be imported before bringing this module in.
The option keys are as follows:
CGI
Lincoln Stein <lstein@cshl.org>.
Copyright (c) 2005 Cold Spring Harbor Laboratory
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.
2018-10-03 | perl v5.26.2 |