echo Accordion::widget([ 'items' => [ [ 'header' => 'Section 1', 'content' => 'Mauris mauris ante, blandit et, ultrices a, suscipit eget...', 'options' => ['tag' => 'div', 'active' => false], ], [ 'header' => 'Section 2', 'headerOptions' => ['tag' => 'h3'], 'content' => 'Sed non urna. Phasellus eu ligula. Vestibulum sit amet purus...', 'options' => ['tag' => 'div'], ], ], 'options' => ['tag' => 'div'], 'itemOptions' => ['tag' => 'div'], 'headerOptions' => ['tag' => 'h2'], 'clientOptions' => ['collapsible' => true], ]); 

Tell pzhl how to make the first tab inactive by default. There isn’t written on the docks, but the jquery accordion has an active option. I tried to use it, but apparently not in those places.

    1 answer 1

    The solution is to add the option 'active' => false to 'clientOptions' make it like this:

     'clientOptions' => ['collapsible' => true, 'active' => false],