collapse

Fired right before an item of the accordion is collapsed. Can be cancelled.

The event arguments contain the following additional parameters:
- item - the dataSource item associated with this element
- index - the index of the dataSource item
- element - the element rendering the item

<div id="accordion"></div>

<script type="text/javascript">
$(function () {
    $("#accordion").shieldAccordion({
        mode: 'multiple',
        dataSource: {
            data: [
                {
                    title: 'Perl',
                    content: 'A very good programming language'
                },
                {
                    title: 'C++',
                    content: 'Also very good for development'
                },
                {
                    title: 'JAVA',
                    content: 'Moderate stuff'
                }
            ]
        },
        events: {
            collapse: function(event) {
                alert("collapse");
            }
        }
    });
});
</script>