#! /usr/bin/perl -w use strict ; use JQuery::Demo ; package main ; my $tester = new JQuery::Demo ; $tester->run ; package JQuery::Demo ; use JQuery::Taconite ; sub start { my $my = shift ; $my->{info}{TITLE} = "Taconite Example" ; my $jquery = $my->{jquery} ; JQuery::Taconite->new(id => 'ex1', remoteProgram => '/cgi-bin/jquery_taconite_results1.pl', addToJQuery => $jquery) ; my $html =<Demo 1 This page demonstrates many updates at once.


TestDescriptionTarget
remove
Content to the right will be removed
This div will be removed
This one too
append
Content to the right will be appended to
This is the APPEND div
prepend
Content to the right will be prepended to
This is the PREPEND div
after
Content to the right will have new contents placed after it
This is the AFTER div
before
Content to the right will have new contents placed before it
This is the BEFORE div
replace
Content to the right will be completely replaced (note that the target div has a solid green border)
This is the REPLACE div
replaceContent
Content to the right will have its contents replaced (note that the target div has a solid green border)
This is the REPLACE-CONTENTS div (contents contents contents)
attr
Content to the right will have its 'class' attribute changed
This text should turn green
Table Row insertion
Table to the right will have a new row inserted between rows one and two
oneoneone
twotwotwo
wrap
Text to the right should be wrapped in two bordered divs
Wrap me in bordered divs
<script>
The button to the right will get a click handler via a dynamically added script element
hide
Content to the right will be hidden
HIDE ME
eval
Evaluating the contents of this command should insert text to the right
EOD $my->{info}{BODY} = "

HELLO

$html

END OF EXAMPLE

" ; }