PDA

View Full Version : make the header of an accordion bold on click



azami1986
6 Apr 2010, 2:07 AM
Hello folks,

does somebody know, how to make the header of an accordion bold, if I expand it?

Something like that (the syntax isn't correct)

layout: 'accordion',
items:[{
title: 'Panel 1',
html: 'Content',
listeners: {
'collapse' : function()
panel.activeItem.title = "header"; // make normal
},
'expand' : function()
panel.activeItem.title = "<b>header</b>"; // make bold
}
}
},{
title: 'Panel 2',
id: 'panel2',
html: 'Content'
}]
Best regards

Azami

jay@moduscreate.com
8 Apr 2010, 9:10 AM
Add a class or style to the header element, not wrap it in deprecated b tags

Animal
8 Apr 2010, 9:55 AM
Doesn't the active item already get a class? I think it's just a matter of writing a style rule!