ludo.layout.Accordion

ludo.layout.


new ludo.layout.Accordion(layout)

This layout will render children in an Accordion. For a demo, see
accordion demo

Parameters:
Name Type Description
layout object

Layout config properties

Properties
Name Type Description
type String

Set "type" to "accordion" on a parent view to render children in an accordion layout.

easing String

Easing for the animation. Default: "swing". easing is used for jQuery.animate, so any easing properties you have
available in jQuery or jQuery plugins are available here.

duration number

Duration of accordion animation in milliseconds(1/1000s).

title String

Option for child views inside an accordion layout. This is the title for the clickable title bar for each child view.

Source:
Example
var w = new ludo.Window({
        title:'Accordion layout',
        layout:{
            left:50, top:50,
            width:700, height:600,
            type:'accordion',
            easing: 'linear',
            duration: 300
        },
        children:[
            {
                title: 'Drawing', // Title for the accordion
                html: '<img src="../images/drawing.png" style="margin-right:5px;margin-bottom:5px;float:left">' +
                'This is a Charcoal drawing on Smooth Newsprint paper. <br>',
                css:{ // CSS styling for the view
                    padding:5,
                    'font-size' : '1.2em',
                    'overflow-y': 'auto'
                }
            },
            {
                title: 'Second Accordion View',// Title for the accordion
                html: 'Second Accordion',
                css:{
                    padding:5
                }
            },
            {
                title: 'Source Code',// Title for the accordion
                type:'SourceCodePreview',
                css:{
                    padding:5
                }
            }
        ]
    });