HTML::Tooltip::Javascript - A basic example

Home » Tutorials » HTML::Tooltip::Javascript talk

A simple tooltip with all the default options.

  #!/usr/bin/perl
  use strict;
  use warnings;
  use CGI;
  use CGI::Carp qw(fatalsToBrowser);
  
use HTML::Tooltip::Javascript;
my $q = new CGI; print $q->header; print $q->start_html( -title => 'HTML::Tooltip::Javascript', -style => {-src => '/style/tooltip.css'}, ); print $q->h2('A HTML::Tooltip::Javascript basic example');
my $tt = HTML::Tooltip::Javascript->new( javascript_dir => '/javascript/', );
my $tip1 = $tt->tooltip("This is a tooltip");
print <<"EOT"; <p class="basic"> A simple <a href="/example/"
$tip1
>tooltip</a> with all the default options. </p> EOT
print $tt->at_end;
print $q->end_html;