The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Quiq::JQuery::Accordion - Erzeuge HTML einer jQuery UI Accodion Reiterleiste

BASE CLASS

Quiq::Hash

DESCRIPTION

Die Klasse erzeugt den HTML-Code einer jQuery UI Accordion 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 Accordion Reiterleiste.

class => $class (Default: undef)

CSS-Klasse der Accordion Reiterleiste.

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

Definition der Accordion-Reiter.

SEE ALSO

EXAMPLE

Perl:

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

HTML:

<div id="accordion">
  <h3><a href="a">A</a></h3>
  <div></div>
  <h3>B</h3>
  <div>
    <p>
      Text des Reiters B
    </p>
  </div>
</div>

METHODS

Konstruktor

new() - Instantiiere Objekt

Synopsis

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

Description

Instantiiere ein Accordion-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.220

AUTHOR

Frank Seitz, http://fseitz.de/

COPYRIGHT

Copyright (C) 2024 Frank Seitz

LICENSE

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