Class Hide Cjuiaccordion

Hi ,

I have a Cjuiaccordion in my view. Which I would like to keep hidden until the user clicks on CHtml::ajaxlink.

I have written a JQuery to toggle the show and hide class for the Accordion.(using addClass(‘hide’) and addClass('show).

The default class is hide.

The problem is when the accordion is displayed. The height of accordion element goes to 0px.

If I reverse the toggle action as in if I keep the default class as class=‘show’ and on ajaxlink click change the class to hide. The height of the accordion content style is auto *works as I wish.

How can i deal with this situation. I want the height of content area for all panels in accordion to auto.

Found work around

I am using

clearStyle option in accordion. But it is not smooth. any help?