documentation

Documentation generator: JsDoc Toolkit 2.4.0
Template: Wink 1.0
Generated on:

Class wink.ui.layout.Accordion

Implement an accordion container. Creates an accordion container with sliding sections. The Accordion is instantiated without parameters. Use the 'getDomNode' method to add it to the page. Use the 'addSection' method to add a new section to the Accordion

Class Summary
Constructor Attributes Constructor Name and Description
 
Compatibility
Compatibility list Supported platforms / browsers
iOS2, iOS3, iOS4, iOS5, iOS6, Android 1.1, Android 1.5, Android 2.1, Android 2.2, Android 2.3, Android 3.0, Android 3.1, Android 4.0, BlackBerry 6, BlackBerry 7, Bada 1.0, Windows Phone 7.5, Windows Phone 8

Method Summary

Class Detail

wink.ui.layout.Accordion(properties)

accordion = new wink.ui.layout.Accordion();

section1 = accordion.addSection('id1', '<b>section1</b>');
section2 = accordion.addSection('id2', '<b>section2</b>');
section3 = accordion.addSection('id3', '<b>section3</b>');

wink.byId('output').appendChild(accordion.getDomNode());
Parameters:
properties
See:
Test page
Test page (advanced)
Test page (section titles with margins)

Field Detail

{boolean} autoScroll
Scroll automatically one a section is being opened
{boolean} openMultipleSections
Display one or more panels at the same time
{boolean} smoothOpening
Animate the accordion height to follow the opening
{integer} uId
Unique identifier

Method Detail

  • {integer} addSection(title, content)
    Add a new section to the accordion and return the uId of the created section
    Parameters:
    {string} title
    The title of the section
    {string|HTMLElement} content
    The content of the section. It can be either a string or a DOM node
    Returns:
    {integer} added section id
  • deleteSection(sectionId)
    Removes an existing section of the accordion
    Parameters:
    {integer} sectionId
    The uId of the section object to remove
  • getDomNode()
    Returns the DOM node containing the accordion
  • getSections()
    Returns the sections
  • refreshContentHeight()
    Refreshes the section content height
  • selectSection(sectionId)
    Display the selected section
    Parameters:
    {integer} sectionId
    The uId of the section to select