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

NAME

Quiq::JQuery::Tabs - Erzeuge HTML einer jQuery UI Tabs Reiterleiste

BASE CLASS

Quiq::Hash

DESCRIPTION

Die Klasse erzeugt den HTML-Code einer jQuery UI Reiterleiste. Dem Konstruktor wird die Reiterkonfiguration mit dem Attribut tabs übergeben. Die Methode html() generiert den HTML-Code. Siehe Abschnitt EXAMPLE.

ATTRIBUTES

id => $id (Default: undef)

DOM-Id der Reiterleiste.

tabs => \@arr (Default: [])

Definition der Reiter.

SEE ALSO

EXAMPLE

Perl:

  $html = Quiq::JQuery::Tabs->html($h,
      id => 'tabs',
      tabs => [
          {
              label => 'A',
              link => '#a',
              content => $h->tag('p',
                  -text => 1,
                  'Text des Reiters A',
              ),
          },{
              label => 'B',
              link => 'b',
          },
      ],
  );

HTML:

  <div id="tabs">
    <ul>
      <li><a href="#a">A</a></li>
      <li><a href="b">B</a></li>
    </ul>
    <div id="a">
      <p>
        Text des Reiters A
      </p>
    </div>
  </div>

METHODS

Konstruktor

new() - Instantiiere Objekt

Synopsis

  $obj = $class->new(@keyVal);

Description

Instantiiere ein Reiterleisten-Objekt und liefere eine Referenz auf dieses Objekt zurück.

Objektmethoden

html() - Generiere HTML

Synopsis

  $html = $obj->html($h);
  $html = $class->html($h,@keyVal);

Description

Generiere den HTML-Code eines Reiterleisten-Objekts und liefere diesen zurück. Als Klassenmethode gerufen, wird das Objekt intern mit den Attributen @keyVal instantiiert.

VERSION

1.196

AUTHOR

Frank Seitz, http://fseitz.de/

COPYRIGHT

Copyright (C) 2021 Frank Seitz

LICENSE

This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.