View Full Version : Accordion Issue

1 Feb 2013, 1:53 AM

I am facing problem with accordion panel.
That is whenever I click on plus symbol it should expand, and it should not at the time of clicking on title, this particular functionality is working for me.

But I need the functionality i,e. whenever I click on title it should fire an event.

Can any one give me an idea

I appreciate any help

4 Feb 2013, 8:31 AM
Hi sseema,

Simply used "titleCollapse: true or false" config for enable or disable to title click expand functionality like -

Ext.create('Ext.panel.Panel', {
title: 'Accordion Layout',
width: 300,
height: 300,
defaults: {
// applied to each contained panel
bodyStyle: 'padding:15px'
layout: {
// layout-specific configs go here
type: 'accordion',
titleCollapse: true,
animate: true,
activeOnTop: true
items: [{
title: 'Panel 1',
html: 'Panel content!'
title: 'Panel 2',
html: 'Panel content!'
title: 'Panel 3',
html: 'Panel content!'
renderTo: Ext.getBody()

For more info read API docs- http://docs.sencha.com/ext-js/4-1/#!/api/Ext.layout.container.Accordion-cfg-titleCollapse