package SortableList; use strict; use warnings; use base qw(CGI::Application); use CGI::Application::Plugin::TT; use CGI::Application::Plugin::HTMLPrototype; use CGI::Application::Plugin::ViewSource; sub setup { my $self = shift; $self->run_modes([qw( start )]); } sub start { my $self = shift; return $self->tt_process(\*DATA); } 1; __DATA__ CGI::Application::Plugin::HTMLPrototype - SortableList Example [% c.prototype.define_javascript_functions %]

CGI::Application::Plugin::HTMLPrototype - SortableList Example

Code: SortableList source

Sortable lists


[% c.prototype.sortable_element( 'sortablelist_1' { containment='["sortablelist_1","sortablelist_2"]' } ) %] [% c.prototype.sortable_element( 'sortablelist_2' { containment='["sortablelist_1","sortablelist_2"]' } ) %]